Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Awaiting C+ Payment confirmation] [HOLD for payment 2023-08-21] [$1000] Inconsistent file error result on uploading unsupported file type #19718

Closed
1 of 6 tasks
kavimuru opened this issue May 27, 2023 · 63 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@kavimuru
Copy link

kavimuru commented May 27, 2023

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


Action Performed:

  1. Open staging.new.expensify.com
  2. Send a .exe file to a chat
  3. Send a .tar.gz file to a chat

Expected Result:

Both should have consistent unsupported file type error

Actual Result:

While trying to attach .exe file returned error dialog immediately, trying to attach .tar.gz file doesn't returned the same dialog error and returned the error on sending the message instead

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.19-2
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
Notes/Photos/Videos: Any additional supporting documentation

Inconsistent.File.Filter.mp4
Recording.785.mp4

Expensify/Expensify Issue URL:
Issue reported by: @kerupuksambel
Slack conversation:
https://expensify.slack.com/archives/C049HHMV9SM/p1684986305893649
View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018f83b776223928ef
  • Upwork Job ID: 1663615039149555712
  • Last Price Increase: 2023-06-06
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 27, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 27, 2023

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

@PrashantMangukiya
Copy link
Contributor

PrashantMangukiya commented May 27, 2023

Proposal

Posting proposal early as per new guidelines

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

Inconsistent file error result on uploading unsupported file type

What is the root cause of that problem?

Not allowed file type checking done via variable from const file here

App/src/CONST.js

Lines 41 to 95 in 12d2f3c

UNALLOWED_EXTENSIONS: [
'ade',
'adp',
'apk',
'appx',
'appxbundle',
'bat',
'cab',
'chm',
'cmd',
'com',
'cpl',
'diagcab',
'diagcfg',
'diagpack',
'dll',
'dmg',
'ex',
'ex_',
'exe',
'hta',
'img',
'ins',
'iso',
'isp',
'jar',
'jnlp',
'js',
'jse',
'lib',
'lnk',
'mde',
'msc',
'msi',
'msix',
'msixbundle',
'msp',
'mst',
'nsh',
'pif',
'ps1',
'scr',
'sct',
'shb',
'sys',
'vb',
'vbe',
'vbs',
'vhd',
'vxd',
'wsc',
'wsf',
'wsh',
'xll',
],

We can see gz extension not added in this. So it will not show error while file selected with gz extension. This is the root cause of the problem.

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

We have to add gz extension within UNALLOWED_EXTENSIONS array as shown under. It will solve the issue.

UNALLOWED_EXTENSIONS: [ 
   ...
  'exe',
  'gz',    // *** Add this
  'hta',
   ...
]

What alternative solutions did you explore? (Optional)

None

Result
19718-Unallowed.mov

@melvin-bot melvin-bot bot added the Overdue label May 29, 2023
@trjExpensify
Copy link
Contributor

Yeah, seems clear to me. Though, @Beamanator are we just going to keep running into this maintaining a list of "unallowed filetypes" versus a list of allowed ones and then throwing the front-end error if it's not one of them? 😕

@melvin-bot melvin-bot bot removed the Overdue label May 30, 2023
@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label May 30, 2023
@melvin-bot melvin-bot bot changed the title Inconsistent file error result on uploading unsupported file type [$1000] Inconsistent file error result on uploading unsupported file type May 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

Job added to Upwork: https://www.upwork.com/jobs/~018f83b776223928ef

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

Current assignee @trjExpensify is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

Triggered auto assignment to @amyevans (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@Beamanator
Copy link
Contributor

@trjExpensify gooood question, I think there's another issue somewhere else where someone has been working on allowing all file types? Or many more or something like that? I've really only mainly worked on image file type stuff for avatars sorry :D

@amyevans
Copy link
Contributor

I believe it's @youssef-lr

@youssef-lr
Copy link
Contributor

I'm not really sure if we should fix this, or, as a few engineers have suggested, remove this limitation and allow all filetypes to be uploaded. We initially implemented this as a measure of security to protect users from downloading potentially harmful files in public rooms. I think I'll bring this up and Slack to see if we really need to be blocking certain filetypes or not.

@youssef-lr
Copy link
Contributor

@amyevans
Copy link
Contributor

Thanks!

@trjExpensify
Copy link
Contributor

Where did we land here?

@amyevans
Copy link
Contributor

amyevans commented Jun 1, 2023

I bumped the thread to confirm if this is the path we'd like to pursue:

remove the list of unallowed extensions from both App and Web-E

@melvin-bot melvin-bot bot added the Overdue label Jun 5, 2023
@trjExpensify
Copy link
Contributor

Cool, seems like we have agreement yeah?

@melvin-bot melvin-bot bot removed the Overdue label Jun 5, 2023
@amyevans
Copy link
Contributor

amyevans commented Jun 5, 2023

Yes, let's field an external proposal to remove the UNALLOWED_EXTENSIONS list and any related logic from the FE.

cc @PrashantMangukiya in case you'd like to update your proposal

@PrashantMangukiya
Copy link
Contributor

@amyevans Sure, let me update proposal to remove UNALLOWED_EXTENSIONS list and any related logic from the FE.

@amyevans amyevans changed the title [HOLD Web-E 38169] [$1000] Inconsistent file error result on uploading unsupported file type [$1000] Inconsistent file error result on uploading unsupported file type Aug 4, 2023
@youssef-lr
Copy link
Contributor

Woops, on it.

@trjExpensify
Copy link
Contributor

PR hit staging 4 days ago, Melv.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Aug 14, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Inconsistent file error result on uploading unsupported file type [HOLD for payment 2023-08-21] [$1000] Inconsistent file error result on uploading unsupported file type Aug 14, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.53-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-08-21. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

  • @sobitneupane does not require payment (Eligable for Manual Requests)

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
  • [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@sobitneupane] Determine if we should create a regression test for this bug.
  • [@sobitneupane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@sobitneupane
Copy link
Contributor

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

The cause of the initially reported issue is missing of certain file type in UNALLOWED_EXTENSIONS. We got rid of all those UNALLOWED_EXTENSIONS and now all file types are allowed.

@sobitneupane
Copy link
Contributor

Regression Test Proposal

  1. Upload files with extension .exe and .tar.gz
  2. Verify that those files are uploaded successfully without any error.

Do we agree 👍 or 👎

@sobitneupane
Copy link
Contributor

Requested payment on newDot.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 Daily KSv2 labels Aug 21, 2023
@trjExpensify
Copy link
Contributor

Okay, so confirming payments as follows:

As for the regression test proposal, we already have multiple (and more common) different file types being tested, so I don't think we need to add one for .tar and .exe specifically.

@trjExpensify
Copy link
Contributor

@kerupuksambel - sent you an offer!

@kerupuksambel
Copy link

@kerupuksambel - sent you an offer!

Accepted the offer, thank you!

@trjExpensify
Copy link
Contributor

Paid! Updating the title to await confirmation of @sobitneupane's.

@trjExpensify trjExpensify changed the title [HOLD for payment 2023-08-21] [$1000] Inconsistent file error result on uploading unsupported file type [Awaiting C+ Payment confirmation] [HOLD for payment 2023-08-21] [$1000] Inconsistent file error result on uploading unsupported file type Aug 21, 2023
@melvin-bot melvin-bot bot added the Overdue label Aug 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 25, 2023

@amyevans, @youssef-lr, @trjExpensify, @sobitneupane Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

@amyevans, @youssef-lr, @trjExpensify, @sobitneupane 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@amyevans
Copy link
Contributor

@trjExpensify Do we need to keep it open for confirmation of C+ payment? I think on other issues I've seen them closed prior.

@melvin-bot melvin-bot bot removed the Overdue label Aug 29, 2023
@JmillsExpensify
Copy link

Reviewed the details for @sobitneupane. $1,000 approved for payment in NewDot based on BZ summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

9 participants