Skip to content

[$500] Public Room-Anonymous user can download images #30806

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


**Version Number:**1.3.95-0
**Reproducible in staging?:**Y
**Reproducible in production?:**Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
**Issue reported by:**Applause - Internal Team
Slack conversation:

Action Performed:

  1. Log out of New Dot Expensify if previously logged in
  2. Navigate to any public room via url (for example this link - https://staging.new.expensify.com/r/5408450846930023
    )
  3. Verify you can see the announce room as an anonymous user
  4. Right click on any image in the conversation
  5. Click Download

Expected Result:

Clicking on Download should not be allowed to an unauthenticated user, so should be redirected to the Sign In page

Actual Result:

Image is downloaded although anonymous user doesn't have the authentication

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6261532_1698963588150.anonymous_user_downloads_images.mp4

Bug6261532_1698963588156!anonymous_user_download_images

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0114824716246f4944
  • Upwork Job ID: 1720206387814977536
  • Last Price Increase: 2023-11-02

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 2, 2023
  2. changed the title [-]Public Room-Anonymous user can download images[/-] [+][$500] Public Room-Anonymous user can download images[/+] on Nov 2, 2023
  3. melvin-bot commented on Nov 2, 2023

    @melvin-bot

    Triggered auto assignment to @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  4. melvin-bot commented on Nov 2, 2023

    @melvin-bot
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 2, 2023
  6. melvin-bot commented on Nov 2, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  7. melvin-bot commented on Nov 2, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (External)

  8. tienifr commented on Nov 2, 2023

    @tienifr
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Anonymous user can download images in public rooms.

    What is the root cause of that problem?

    We allow Download for annonymous user here:

    What changes do you think we should make in order to solve the problem?

    Set the above prop to false.

    What alternative solutions did you explore? (Optional)

    NA

  9. yh-0218 commented on Nov 2, 2023

    @yh-0218
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Anonymous user can download images in public rooms.

    What is the root cause of that problem?

    Download is allowed for annonymous user.

    What changes do you think we should make in order to solve the problem?

    1. we need to update isAnonymousAction: false
    2. we need to add && !Session.isAnonymousUser() here
      shouldShowDownloadButton={props.allowDownload && shouldShowDownloadButton && !isAttachmentReceipt && !isOffline}

    What alternative solutions did you explore? (Optional)

    Screen.Recording.2023-11-03.at.1.39.16.AM.mov
  10. DylanDylann commented on Nov 3, 2023

    @DylanDylann
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    • Anonymous user can download images in public rooms.

    What is the root cause of that problem?

    • We allow annonymous user to download image.

    What changes do you think we should make in order to solve the problem?

    • We have a function fileDownload used to handle download action in entire the app.
      export default function fileDownload(url, fileName) {
    • So we should add the logic check isAnonymousAction to this.

    What alternative solutions did you explore? (Optional)

    • NA
  11. dukenv0307 commented on Nov 3, 2023

    @dukenv0307
    Contributor

    It's expected behavior that we decided here #22321

  12. melvin-bot commented on Nov 6, 2023

    @melvin-bot

    @muttmuure, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

  13. situchan commented on Nov 6, 2023

    @situchan
    Contributor

    @muttmuure can you please double check the expected behavior?
    If this is not bug, I think we should update something since this is reported by QA team.

  14. NisargDeveloper commented on Nov 7, 2023

    @NisargDeveloper

    Are you searching for a resolution?

  15. muttmuure commented on Nov 9, 2023

    @muttmuure
    Contributor

    Seems like expected behavior to me

  16. muttmuure commented on Nov 9, 2023

    @muttmuure
    Contributor

    QA will come back to this issue and see that it is closed as expected. I'm not aware of anywhere that we say it is not.

    @lanitochka17 if you find that we say that this should not happen, please let me know where and I will get it updated. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions