-
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-11-22] Add a step to the Issue New Card form that collects a magic code #50667
Comments
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 ( |
Triggered auto assignment to @trjExpensify ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Add a step to the Issue New Card form that collects a magic code What is the root cause of that problem?This is a new feature request What changes do you think we should make in order to solve the problem?
Line 628 in cff3e86
The details can be discussed in the PR phrase. I can create a test branch if we need What alternative solutions did you explore? (Optional)NA |
Should we work on this issue under |
@nkdengineer thanks! I was thinking the magic code should probably be the first step. My thinking is that there isn't much sense in letting the user fill out the rest of the form if they can't get past the magic code. |
@tgolen If we do that we need an API to help the user verrify before moving to the next step. |
@tgolen I am working on a simpler proposal for this one, please wait assignment for few minutes |
ProposalPlease re-state the problem that we are trying to solve in this issue.Add a step to the Issue New Card form that collects a magic code What is the root cause of that problem?This is a feature request. What changes do you think we should make in order to solve the problem?We can follow the same pattern we used for delegates here, we already have the App/src/libs/actions/Delegate.ts Lines 177 to 179 in 9490328
if (cardType === CONST.EXPENSIFY_CARD.CARD_TYPE.PHYSICAL) {
API.write(WRITE_COMMANDS.CREATE_EXPENSIFY_CARD, {...parameters, feedCountry, validateCode});
return;
}
const domainAccountID = PolicyUtils.getWorkspaceAccountID(policyID);
// eslint-disable-next-line rulesdir/no-multiple-api-calls
API.write(WRITE_COMMANDS.CREATE_ADMIN_ISSUED_VIRTUAL_CARD, {...parameters, domainAccountID, validateCode}); Or we can include that code in the parameters itself. We ned to add a
What alternative solutions did you explore? (Optional) |
|
|
I also agree with @nkdengineer at this point. We also have a PR to reuse ValidateCodeModal as much as possible here. (#49445) |
Yeah, that's right, we should reuse those existing components as much as possible. It sounds like this should work:
|
Yeah. I think we can go with @nkdengineer 's proposal here |
I want to highlight that @getusha and @hungvu193 are working on making the component for the magic code easier to reuse #49445, but it has been proving tricky and taking a bit of time |
Thanks for the heads up @mountiny. Do you want to hold off on doing anything here until that's settled? Or is there something that we can do in this PR that maybe helps the progress of making it easier to reuse? |
I think it would make sense to wait on the refactor, or then we have to double the work. I hope the PR can be wrapped up soon. I have started a thread for this here to hopefully get to faster completion. |
@nkdengineer This should be ready for the frontend PR to be created. |
bump @nkdengineer are you able to get a PR going for this now? |
@nkdengineer Do you have an update on this? If you're not able to prioritize this, I suggest you unassign it so that we can have someone else work on it. |
@tgolen I still update it daily, will give an update soon. |
This issue has not been updated in over 15 days. @tgolen, @trjExpensify, @hungvu193, @nkdengineer eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
PR is still in progress |
PR was merged this morning. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.62-4 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-11-22. 🎊 For reference, here are some details about the assignees on this issue:
|
@hungvu193 @trjExpensify @hungvu193 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
👋 Let's get the checklist done @hungvu193 ahead of Friday! |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
IMO, this is a new feature, I don't think we need a regression test. |
Payment Summary
BugZero Checklist (@trjExpensify)
|
Payment summary:
|
On this, I agree we don't need a new regression test here. We have one for the issue card flow, and it would necessitate going through the magic code validation by design. |
Paid, closing! |
$250 approved for @hungvu193 |
Problem
Someone can issue a physical or virtual Expensify card without verifying they are the owner of the account. This relates to an internal security issue.
Why this is important to solve
This is a security vulnerability which can be taken advantage of if an account is compromised.
Solution
Collect a magic code when issuing physical or virtual Expensify cards. In a little more detail:
validateCode
that is passed to the serverIssueNewCardPage
needs a new step to gather a magic code from the user (we should have existing components that can be reused for this)Issue Owner
Current Issue Owner: @trjExpensifyThe text was updated successfully, but these errors were encountered: