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
F18871349: D14026.diff
Tue, Nov 4, 10:22 PM
F18848407: D14026.id33913.diff
Thu, Oct 30, 4:42 AM
F18824855: D14026.id.diff
Thu, Oct 23, 6:18 PM
F18820769: D14026.diff
Wed, Oct 22, 5:02 PM
F18816246: D14026.id33933.diff
Tue, Oct 21, 5:34 AM
F18815573: D14026.diff
Tue, Oct 21, 2:44 AM
F18812820: D14026.id33913.diff
Mon, Oct 20, 12:35 PM
F18788323: D14026.id33933.diff
Wed, Oct 15, 4:20 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.