Page MenuHomePhabricator

Use better secrets in generating account tokens
ClosedPublic

Authored by epriestley on Apr 10 2014, 5:32 PM.
Tags
None
Referenced Files
F13135264: D8748.diff
Thu, May 2, 7:50 AM
Unknown Object (File)
Mon, Apr 29, 4:28 PM
Unknown Object (File)
Wed, Apr 24, 10:32 PM
Unknown Object (File)
Tue, Apr 9, 10:19 AM
Unknown Object (File)
Mar 31 2024, 1:49 AM
Unknown Object (File)
Mar 29 2024, 12:23 AM
Unknown Object (File)
Mar 11 2024, 1:01 PM
Unknown Object (File)
Feb 13 2024, 10:51 PM
Subscribers

Details

Reviewers
btrahan
Commits
Restricted Diffusion Commit
rPab7d89edc8ad: Use better secrets in generating account tokens
Summary

When we generate account tokens for CSRF keys and email verification, one of the inputs we use is the user's password hash. Users won't always have a password hash, so this is a weak input to key generation. This also couples CSRF weirdly with auth concerns.

Instead, give users a dedicated secret for use in token generation which is used only for this purpose.

Test Plan
  • Ran upgrade scripts.
  • Verified all users got new secrets.
  • Created a new user.
  • Verified they got a secret.
  • Submitted CSRF'd forms, they worked.
  • Adjusted the CSRF token and submitted CSRF'd forms, verified they don't work.

Diff Detail

Repository
rP Phabricator
Branch
accsec
Lint
Lint Passed
Unit
Tests Passed

Event Timeline

epriestley retitled this revision from to Use better secrets in generating account tokens.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Apr 10 2014, 6:29 PM
epriestley updated this revision to Diff 20747.

Closed by commit rPab7d89edc8ad (authored by @epriestley).