@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

data in PhabricatorFile hashed using sha1

Summary: Hash file content using sha1

Test Plan: None provided

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4969

authored by

kwadwo and committed by
epriestley
d8d16ece 49c40d20

+3 -3
+3 -3
src/applications/files/storage/PhabricatorFile.php
··· 121 121 $file = id(new PhabricatorFile())->loadOneWhere( 122 122 'name = %s AND contentHash = %s LIMIT 1', 123 123 self::normalizeFileName(idx($params, 'name')), 124 - PhabricatorHash::digest($data)); 124 + self::hashFileContent($data)); 125 125 126 126 if (!$file) { 127 127 $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); ··· 231 231 $file->setName($file_name); 232 232 $file->setByteSize(strlen($data)); 233 233 $file->setAuthorPHID($authorPHID); 234 - $file->setContentHash(PhabricatorHash::digest($data)); 234 + $file->setContentHash(self::hashFileContent($data)); 235 235 236 236 $file->setStorageEngine($engine_identifier); 237 237 $file->setStorageHandle($data_handle); ··· 373 373 } 374 374 375 375 public static function hashFileContent($data) { 376 - return PhabricatorHash::digest($data); 376 + return sha1($data); 377 377 } 378 378 379 379 public function loadFileData() {