Page MenuHomePhabricator

Remove SHA1 file content hashing and make Files work without any hashing
ClosedPublic

Authored by epriestley on Apr 4 2017, 10:24 PM.
Tags
None
Referenced Files
F15436350: D17619.id42382.diff
Tue, Mar 25, 1:40 PM
F15430144: D17619.id.diff
Mon, Mar 24, 6:12 AM
F15427008: D17619.diff
Sun, Mar 23, 12:13 PM
F15390992: D17619.id42371.diff
Sat, Mar 15, 7:45 AM
F15341231: D17619.id.diff
Sun, Mar 9, 7:11 PM
F15302697: D17619.diff
Wed, Mar 5, 8:11 PM
Unknown Object (File)
Mon, Mar 3, 1:43 PM
Unknown Object (File)
Tue, Feb 25, 7:03 AM
Subscribers
None

Details

Summary

Ref T12464. We currently use SHA1 to detect when two files have the same content so we don't have to store two copies of the data.

Now that a SHA1 collision is known, this is theoretically dangerous. T12464 describes the shape of a possible attack.

Before replacing this with something more robust, shore things up so things work correctly if we don't hash at all. This mechanism is entirely optional; it only helps us store less data if some files are duplicates.

(This mechanism is also less important now than it once was, before we added temporary files.)

Test Plan

Uploaded multiple identical files, saw the uploads work and the files store separate copies of the same data.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable