diff --git a/symphony/lib/toolkit/cryptography/class.pbkdf2.php b/symphony/lib/toolkit/cryptography/class.pbkdf2.php
index <HASH>..<HASH> 100644
--- a/symphony/lib/toolkit/cryptography/class.pbkdf2.php
+++ b/symphony/lib/toolkit/cryptography/class.pbkdf2.php
@@ -114,6 +114,9 @@ class PBKDF2 extends Cryptography
      */
     public static function compare($input, $hash, $isHash = false)
     {
+        if ($isHash) {
+            return hash_equals($hash, $input);
+        }
         $salt = self::extractSalt($hash);
         $iterations = self::extractIterations($hash);
         $keylength = strlen(base64_decode(self::extractHash($hash)));
Add failsafe against direct calls

Picked from a<I>f8db8e9
Picked from <I>c<I>cebf