1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 11:42:42 +01:00
phorge-phorge/src/applications/files/storage
epriestley 873b39be82 Remove PhabricatorFile::buildFromFileDataOrHash()
Summary:
Ref T12464. This is a very old method which can return an existing file instead of creating a new one, if there's some existing file with the same content.

In the best case this is a bad idea. This being somewhat reasonable predates policies, temporary files, etc. Modern methods like `newFromFileData()` do this right: they share underlying data in storage, but not the actual `File` records.

Specifically, this is the case where we get into trouble:

  - I upload a private file with content "X".
  - You somehow generate a file with the same content by, say, viewing a raw diff in Differential.
  - If the diff had the same content, you get my file, but you don't have permission to see it or whatever so everything breaks and is terrible.

Just get rid of this.

Test Plan:
  - Generated an SSH key.
  - Viewed a raw diff in Differential.
  - (Did not test Phragment.)

Reviewers: chad

Reviewed By: chad

Subscribers: hach-que

Maniphest Tasks: T12464

Differential Revision: https://secure.phabricator.com/D17617
2017-04-04 16:18:00 -07:00
..
__tests__ Make the Files "TTL" API more structured 2017-04-04 16:16:28 -07:00
PhabricatorFile.php Remove PhabricatorFile::buildFromFileDataOrHash() 2017-04-04 16:18:00 -07:00
PhabricatorFileChunk.php Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
PhabricatorFileDAO.php Remove @group annotations 2014-07-10 08:12:48 +10:00
PhabricatorFileExternalRequest.php Endpoint+controller for a remarkup image proxy 2016-09-23 10:28:24 -04:00
PhabricatorFileSchemaSpec.php Automatically build all Lisk schemata 2014-10-02 09:51:20 -07:00
PhabricatorFileStorageBlob.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
PhabricatorFileTransaction.php Move Files to ModularTransactions 2017-04-04 10:25:05 -07:00
PhabricatorFileTransactionComment.php Allow file comments to be edited 2016-07-18 16:17:43 -07:00
PhabricatorTransformedFile.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00