Page MenuHomePhabricator

Use phutil_hashes_are_identical() when comparing hashes in Phabricator
ClosedPublic

Authored by epriestley on Sep 1 2015, 2:39 AM.
Tags
None
Referenced Files
F18421895: D14026.diff
Sat, Aug 30, 5:29 PM
F18179665: D14026.id33913.diff
Sat, Aug 16, 4:00 AM
F18112816: D14026.id.diff
Tue, Aug 12, 9:00 PM
F18110100: D14026.diff
Mon, Aug 11, 4:10 PM
F18085148: D14026.id.diff
Tue, Aug 5, 7:01 PM
F17937986: D14026.diff
Jul 31 2025, 1:45 AM
Unknown Object (File)
Jun 27 2025, 5:07 PM
Unknown Object (File)
Jun 15 2025, 5:09 AM

Details

Summary

See D14025. In all cases where we compare hashes, use strict, constant-time comparisons.

Test Plan

Logged in, logged out, added TOTP, ran Conduit, terminated sessions, submitted forms, changed password. Tweaked CSRF token, got rejected.

Diff Detail

Repository
rP Phabricator
Branch
hashcomp
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 7868
Build 8767: [Placeholder Plan] Wait for 30 Seconds
Build 8766: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Use phutil_hashes_are_identical() when comparing hashes in Phabricator.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
src/applications/people/storage/PhabricatorUser.php
411–412

The extra changes here are just following through with this and removing support for the plain CSRF tokens. The BREACH tokens have been in the wild for a little over a year, now.

chad edited edge metadata.
This revision is now accepted and ready to land.Sep 1 2015, 2:46 AM
This revision was automatically updated to reflect the committed changes.