1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 06:20:56 +01:00

Clean up two more sha1 instances

Summary: See T547. One of these I just missed in D1000; the comment change just
makes it easier to audit use of hash functions by cleaning up "grep" output.

Test Plan: Ran isolation unit test.

Reviewers: btrahan, jungejason, nh, tuomaspelkonen, aran

Reviewed By: jungejason

CC: aran, jungejason

Differential Revision: 1124
This commit is contained in:
epriestley 2011-11-17 11:44:28 -08:00
parent 5dba8abceb
commit e0a56cb938
3 changed files with 3 additions and 2 deletions

View file

@ -62,7 +62,7 @@ class DiffusionGitRequest extends DiffusionRequest {
$this->commit); $this->commit);
// Beyond verifying them, expand commit short forms to full 40-character // Beyond verifying them, expand commit short forms to full 40-character
// sha1s. // hashes.
$this->commit = trim($commit); $this->commit = trim($commit);
// If we have a commit, overwrite the branch commit with the more // If we have a commit, overwrite the branch commit with the more

View file

@ -31,7 +31,7 @@ class AphrontIsolatedDatabaseConnectionTestCase
public function testIsolation() { public function testIsolation() {
$conn = $this->newIsolatedConnection(); $conn = $this->newIsolatedConnection();
$test_phid = 'PHID-TEST-'.sha1(mt_rand()); $test_phid = 'PHID-TEST-'.Filesystem::readRandomCharacters(20);
queryfx( queryfx(
$conn, $conn,

View file

@ -11,6 +11,7 @@ phutil_require_module('phabricator', 'infrastructure/testing/testcase');
phutil_require_module('phabricator', 'storage/connection/isolated'); phutil_require_module('phabricator', 'storage/connection/isolated');
phutil_require_module('phabricator', 'storage/queryfx'); phutil_require_module('phabricator', 'storage/queryfx');
phutil_require_module('phutil', 'filesystem');
phutil_require_module('phutil', 'utils'); phutil_require_module('phutil', 'utils');