-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
PasswordLib::createPasswordHash($password, $prefix = '$2a$')
Uses '$2a$' as a default prefix if none is specified. The factory then cycles through the available implementations and compares the $prefix with $implementation::getPrefix() but Blowfish returns '$2y2' on newer versions of PHP which makes PasswordLib throw a \DomainException('Unsupported Prefix Supplied') Exception.
public static function getPrefix() {
if (version_compare(PHP_VERSION, '5.3.7') >= 0) {
return '$2y$';
} else {
return '$2a$';
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels