1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00

Use unique identifier for meme hash

Summary: "a:" plus "b" and "a" plus ":b" created the same ID.

Test Plan: Created a meme.

Reviewers: DeedyDas, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D4631
This commit is contained in:
vrana 2013-01-24 17:26:57 -08:00
parent b873f3f991
commit 651929dec1

View file

@ -20,7 +20,7 @@ final class PhabricatorMacroMemeController
$upper_text = strtoupper($upper_text);
$lower_text = strtoupper($lower_text);
$mixed_text = $upper_text.":".$lower_text;
$mixed_text = md5($upper_text).":".md5($lower_text);
$hash = "meme".hash("sha256", $mixed_text);
$xform = id(new PhabricatorTransformedFile())
->loadOneWhere('originalphid=%s and transform=%s',