HomePhabricator

Require a CSRF code for Twitter and JIRA (OAuth 1) logins

Description

Require a CSRF code for Twitter and JIRA (OAuth 1) logins

Summary:
OAuth1 doesn't have anything like the state parameter, and I overlooked that we need to shove one in there somewhere. Append it to the callback URI. This functions like state in OAuth2.

Without this, an attacker can trick a user into logging into Phabricator with an account the attacker controls.

Test Plan:

  • Logged in with JIRA.
  • Logged in with Twitter.
  • Logged in with Facebook (an OAuth2 provider).
  • Linked a Twitter account.
  • Linked a Facebook account.
  • Jiggered codes in URIs and verified that I got the exceptions I expected.

Reviewers: btrahan, arice

Reviewed By: arice

CC: arice, chad, aran

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

Details

Provenance
epriestleyAuthored on
epriestleyPushed on Feb 24 2014, 12:39 AM
Reviewer
arice
Differential Revision
D8318: Require a CSRF code for Twitter and JIRA (OAuth 1) logins
Parents
rP438915032ae3: Minor, mark SERIALIZATION_PHP fields as BINARY in Lisk
Branches
Unknown
Tags
Unknown

Event Timeline