Skip to content

[HOLD for payment 2024-12-05] [$250] Require magic code validation for SetPersonalDetailsAndShipExpensifyCards #52316

Closed

Description

@MarioExpensify

Problem

Someone can issue multiple physical expensify cards on behalf of a domain without verifying they are actually the owner of the account. This relates to an internal security issue.

Why this is important to solve

This is a security vulnerability that can be taken advantage of if an account is compromised.

Solution

Collect a magic code when requesting a physical Expensify card. In a little more detail:

  • Update this API command here
  • It should have a new parameter called validateCode that is passed to the server
  • In order to do this, anything calling updatePersonalDetailsAndShipExpensifyCards needs a new step to gather a magic code from the user with the ValidateCodeActionModal component from this PR.
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021856002885580948055
  • Upwork Job ID: 1856002885580948055
  • Last Price Increase: 2024-11-11
  • Automatic offers:
    • nkdengineer | Contributor | 104859255
Issue OwnerCurrent Issue Owner: @JmillsExpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 11, 2024
  2. melvin-bot commented on Nov 11, 2024

    @melvin-bot

    Triggered auto assignment to @JmillsExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. changed the title [-]Require magic code validation for SetPersonalDetailsAndShipExpensifyCards[/-] [+][$250] Require magic code validation for SetPersonalDetailsAndShipExpensifyCards[/+] on Nov 11, 2024
  4. melvin-bot commented on Nov 11, 2024

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

    @melvin-bot

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

  7. nkdengineer commented on Nov 11, 2024

    @nkdengineer
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-11-11 16:15:02 UTC.

    Proposal

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

    Require magic code validation for SetPersonalDetailsAndShipExpensifyCards

    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?

    1. We should to add ValidateCodeActionModal to MissingPersonalDetailsContent component

    function MissingPersonalDetailsContent({privatePersonalDetails, draftValues}: MissingPersonalDetailsContentProps) {

    1. Update function handleFinishStep to open magic code modal then onSubmit of magic code modal call API get validateCode and send it to updatePersonalDetailsAndShipExpensifyCards API

    2. Add validateCode to this parameters

      const parameters: SetPersonalDetailsAndShipExpensifyCardsParams = {

    What alternative solutions did you explore? (Optional)

  8. rushatgabhane commented on Nov 12, 2024

    @rushatgabhane
    Member

    This is straight forward implementation issue. let's hire @nkdengineer

    🎀 👀 🎀

  9. melvin-bot commented on Nov 12, 2024

    @melvin-bot

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

  10. MarioExpensify commented on Nov 12, 2024

    @MarioExpensify
    ContributorAuthor

    Moving forward with @nkdengineer, thank you @rushatgabhane!!

  11. 8 remaining items

  12. changed the title [-][$250] Require magic code validation for SetPersonalDetailsAndShipExpensifyCards[/-] [+][HOLD for payment 2024-12-05] [$250] Require magic code validation for SetPersonalDetailsAndShipExpensifyCards[/+] on Nov 28, 2024
  13. melvin-bot commented on Nov 28, 2024

    @melvin-bot

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

  14. melvin-bot commented on Nov 28, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.67-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-12-05. 🎊

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

  15. melvin-bot commented on Nov 28, 2024

    @melvin-bot

    @rushatgabhane @JmillsExpensify @rushatgabhane 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]

  16. rushatgabhane commented on Dec 2, 2024

    @rushatgabhane
    Member

    Checklist

    Not a bug. New feature. So we should add a regression test

    Prerequisites:
    Workspace is connected with a bank account.
    Workspace has a member invited.
    Workspace has enabled Expensify card.
    Admin has issued a physical card for employee.
    
    1. Employee clicks to the "Add shipping detail" button
    2. Finish this flow
    3. Verify that: At the end of this flow, require magic code modal is displayed
    
  17. JmillsExpensify commented on Dec 9, 2024

    @JmillsExpensify
    Contributor

    Payment summary:

  18. JmillsExpensify commented on Dec 9, 2024

    @JmillsExpensify
    Contributor

    @rushatgabhane please submit via New Expensify. Contributor paid via Upwork and regression test created.

  19. garrettmknight commented on Dec 12, 2024

    @garrettmknight
    Contributor

    $250 approved for @rushatgabhane

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions