Page MenuHomePhabricator

Fix a CSRF issue with adding new email addresses
ClosedPublic

Authored by epriestley on Jun 30 2016, 3:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 30, 11:18 PM
Unknown Object (File)
Sat, Apr 27, 10:32 AM
Unknown Object (File)
Wed, Apr 17, 2:45 PM
Unknown Object (File)
Thu, Apr 11, 7:05 AM
Unknown Object (File)
Sat, Apr 6, 3:24 PM
Unknown Object (File)
Fri, Apr 5, 1:47 PM
Unknown Object (File)
Apr 2 2024, 3:23 PM
Unknown Object (File)
Apr 2 2024, 12:07 PM
Subscribers
None

Details

Summary

The first dialog was being given the wrong user ($user, should be $viewer), leading to a CSRF issue.

(The CSRF token it generated was invalid in all validation contexts, so this wasn't a security problem or a way to capture CSRF tokens for other users.)

Use newDialog() instead.

(This seems completely unrelated to the vaguely-similar-looking issues we saw earlier this week.)

Test Plan
  • Added a new email address.
  • Clicked "Done" on the last step.
  • Completed workflow instead of getting a CSRF error.

Diff Detail

Repository
rP Phabricator
Branch
csrf1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 12841
Build 16363: Run Core Tests
Build 16362: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Fix a CSRF issue with adding new email addresses.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
tide added a reviewer: tide.
This revision is now accepted and ready to land.Jun 30 2016, 3:31 PM
This revision was automatically updated to reflect the committed changes.