Use binary output from `hash()`
authorTim Düsterhus <timwolla@googlemail.com>
Fri, 8 Mar 2019 16:35:32 +0000 (17:35 +0100)
committerGitHub <noreply@github.com>
Fri, 8 Mar 2019 16:35:32 +0000 (17:35 +0100)
Co-Authored-By: dtdesign <ebert@woltlab.com>
wcfsetup/install/files/lib/data/blacklist/entry/BlacklistEntry.class.php

index 8adcff96346da942e6b50dbede3aa517909ac5d8..dac70e12de5738f01a56a65d8e4c91c36fa98bdd 100644 (file)
@@ -73,7 +73,7 @@ class BlacklistEntry extends DatabaseObject {
        }
        
        protected static function getHash($string) {
-               return hex2bin(hash('sha256', $string));
+               return hash('sha256', $string, true);
        }
        
        protected static function isMatch($type, $occurrences) {