Page MenuHomePhabricator

D17622.id42385.diff
No OneTemporary

D17622.id42385.diff

diff --git a/src/upload/ArcanistFileDataRef.php b/src/upload/ArcanistFileDataRef.php
--- a/src/upload/ArcanistFileDataRef.php
+++ b/src/upload/ArcanistFileDataRef.php
@@ -346,11 +346,23 @@
}
private function newFileHash($path) {
- return null;
+ $hash = hash_file('sha256', $path, $raw_output = false);
+
+ if ($hash === false) {
+ return null;
+ }
+
+ return $hash;
}
private function newDataHash($data) {
- return null;
+ $hash = hash('sha256', $data, $raw_output = false);
+
+ if ($hash === false) {
+ return null;
+ }
+
+ return $hash;
}
}

File Metadata

Mime Type
text/plain
Expires
Sat, May 11, 1:41 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6284668
Default Alt Text
D17622.id42385.diff (607 B)

Event Timeline