Page MenuHomePhabricator

Use better secrets in generating account tokens
ClosedPublic

Authored by epriestley on Apr 10 2014, 5:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 9, 10:19 AM
Unknown Object (File)
Sun, Mar 31, 1:49 AM
Unknown Object (File)
Fri, Mar 29, 12:23 AM
Unknown Object (File)
Mar 11 2024, 1:01 PM
Unknown Object (File)
Feb 13 2024, 10:51 PM
Unknown Object (File)
Feb 13 2024, 10:51 PM
Unknown Object (File)
Feb 13 2024, 10:51 PM
Unknown Object (File)
Feb 6 2024, 4:31 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
Lint
Lint Skipped
Unit
Tests Skipped

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).