-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2024-06-28] [$250] IOU - Password-protected PDF not handled correctly when added to IOU as recipient #42078
Comments
Triggered auto assignment to @kevinksullivan ( |
@kevinksullivan FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
We think that this bug might be related to #vip-vsp |
ProposalPlease re-state the problem that we are trying to solve in this issue.There are 2 issues:
What is the root cause of that problem?
App/src/components/MoneyRequestConfirmationList.tsx Lines 1152 to 1160 in b62080a
What changes do you think we should make in order to solve the problem?
Line 410 in 7954145
then hide the modal by reset
if (enablePreviewModal && propsObj.isPDFThumbnail) {
return (
<>
<PDFThumbnail
enabled={!isAttachmentInvalid}
onPassword={() => setIsAttachmentInvalid(true)}
/>
<ConfirmModal
onConfirm={() => {
IOU.detachReceipt(transaction?.transactionID ?? '');
setIsAttachmentInvalid(false);
}}
onCancel={() => {
IOU.detachReceipt(transaction?.transactionID ?? '');
setIsAttachmentInvalid(false);
}}
isVisible={isAttachmentInvalid}
/>
</>
); Note to use |
I think this is quite a critical issue because user couldn't dismiss the invalid receipt type modal even when they refreshed the page as mentioned in my proposal. |
@kevinksullivan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@kevinksullivan Still overdue 6 days?! Let's take care of this! |
Hmm I think because it is IOU related we'd make a low priority split item. @saracouto curious if you agree! |
Job added to Upwork: https://www.upwork.com/jobs/~0126fd5d796dca6c8e |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dukenv0307 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Password-protected PDF added to IOU is not handled properly What is the root cause of that problem?When we create a new money request, we have this logic to show error if the PDF is password-protected. But when we try to replace a receipt after already created the money request, there won't be any logic. The way we're doing it is not ideal, first we still allow the user to upload the password-protected PDF, it won't fail the validation here. Then when we try to render the PDF, if it requires a password, then we show an error modal and if the modal is dismissed, the user will go back to the previous screen. This is not a good practice because:
What changes do you think we should make in order to solve the problem?We should validate the password protected PDF here right where the user uploads it. First we need to define a method to validate the password protected PDF, we can easily achieve it by using built-in feature from
Then in here, if the file is pdf, validate password protected and show the proper error modal, similar to other attachment errors:
Similar change needs to be done for native platform (if required). Then we can remove the redundant logic and UI that validates the PDF in the confirmation page here because we would never allow uploading of password-protected PDF and setting it in Onyx in the first place. What alternative solutions did you explore? (Optional)We can extend the above approach to work for other cases of PDF failure too, like corrupted PDF. They will have different error reasons. ResultWorking well now, the error shows immediately right in the upload page if the user uploads password-protected PDF. |
@tienifr's solution makes sense to me.
or creating a new function to check if the file is corrupted. It's the expand of You can do it in PR phase. 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @Julesssss, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.0-9 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 2024-06-28. 🎊 For reference, here are some details about the assignees on this issue:
|
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:
|
@dannymcclain, @Julesssss, @kevinksullivan, @tienifr, @dukenv0307 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Hi @dukenv0307 can you complete the checklist above please? |
BugZero Checklist:
Regression test:
Do we 👍 or 👎 |
@kevinksullivan done |
@dukenv0307 what does this mean?
How would you add a PDF as a recipient? |
@kevinksullivan I updated the Regression test. Can you help take a look? |
@dannymcclain, @Julesssss, @kevinksullivan, @tienifr, @dukenv0307 Eep! 4 days overdue now. Issues have feelings too... |
@dannymcclain, @Julesssss, @kevinksullivan, @tienifr, @dukenv0307 Still overdue 6 days?! Let's take care of this! |
@dannymcclain, @Julesssss, @kevinksullivan, @tienifr, @dukenv0307 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it! |
@kevinksullivan I've requested payment via NewDot, no Upwork payment needed 👍 |
Looks good @dukenv0307 |
all set on payments |
Re-opening for the payment summary. |
Payment summary
|
$250 approved for @tienifr |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.73-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: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
During the expense submission process (FAB > Submit expense > add amount > choose workspace), when attempting to add a password-protected PDF, an error occurs stating "password-protected PDF is not supported." This error handling should also be applied when adding a password-protected PDF as the recipient in the IOU
Actual Result:
Password-protected PDF added to IOU is not handled properly
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6479273_1715601330328.Screen_Recording_2024-05-13_at_4.40.33_AM.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @kevinksullivanThe text was updated successfully, but these errors were encountered: