Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit b9a61e5

Browse files
committed
Improved check
1 parent 229dc4c commit b9a61e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/UserRepository/Htpasswd.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function authenticate(string $credential, string $password = null) : ?Use
7070
*/
7171
protected function checkBcryptHash(string $hash) : void
7272
{
73-
if ('$2y$' !== substr($hash, 0, 4)) {
73+
if (0 !== strpos($hash, '$2y$')) {
7474
throw new Exception\RuntimeException(
7575
'The htpasswd file uses not secure hash algorithm. Please use bcrypt.'
7676
);

0 commit comments

Comments
 (0)