mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Check filename before reading file from cache
Test Plan: Downloaded empty file, got proper filename. Reviewers: btrahan, epriestley Reviewed By: btrahan CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3534
This commit is contained in:
parent
65bbd24974
commit
8d0918885d
1 changed files with 2 additions and 1 deletions
|
@ -127,7 +127,8 @@ final class PhabricatorFile extends PhabricatorFileDAO {
|
|||
array $params = array()) {
|
||||
|
||||
$file = id(new PhabricatorFile())->loadOneWhere(
|
||||
'contentHash = %s LIMIT 1',
|
||||
'name = %s AND contentHash = %s LIMIT 1',
|
||||
self::normalizeFileName(idx($params, 'name')),
|
||||
PhabricatorHash::digest($data));
|
||||
|
||||
if (!$file) {
|
||||
|
|
Loading…
Reference in a new issue