HomePhabricator

Fix a CSRF issue with adding new email addresses

Description

Fix a CSRF issue with adding new email addresses

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.

Reviewers: chad, tide

Reviewed By: tide

Differential Revision: https://secure.phabricator.com/D16200

Details

Provenance
epriestleyAuthored on Jun 30 2016, 3:22 PM
epriestleyPushed on Jun 30 2016, 3:35 PM
Reviewer
tide
Differential Revision
D16200: Fix a CSRF issue with adding new email addresses
Parents
rP922822bd2dc3: Wrap really long text properly in diffs
Branches
Unknown
Tags
Unknown
Build Status
Buildable 12842
Build 16364: Run Core Tests