Improved RegEx for bcrypt probing
authorAlexander Ebert <ebert@woltlab.com>
Thu, 3 Jan 2013 16:20:24 +0000 (17:20 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 3 Jan 2013 16:20:24 +0000 (17:20 +0100)
wcfsetup/install/files/lib/util/PasswordUtil.class.php

index 4e9e2d26e5cef442357001ad794243bc52fef5c6..8824878600ae046aeb6ebc2c81ee28be572d15a7 100644 (file)
@@ -68,7 +68,7 @@ final class PasswordUtil {
         * @return      boolean
         */
        public static function isBlowfish($hash) {
-               return (Regex::compile('^\$2(a|f|x)\$')->match($hash) ? true : false);
+               return (Regex::compile('^\$2[afx]\$')->match($hash) ? true : false);
        }
        
        /**