Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aaf46d1

Browse files
[Security/Core] fix checking for bcrypt
1 parent 061ac77 commit aaf46d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Security/Core/Encoder/NativePasswordEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function __construct(int $opsLimit = null, int $memLimit = null, int $cos
7575
*/
7676
public function encodePassword($raw, $salt): string
7777
{
78-
if (\strlen($raw) > self::MAX_PASSWORD_LENGTH || ((string) \PASSWORD_BCRYPT === $this->algo && 72 < \strlen($raw))) {
78+
if (\strlen($raw) > self::MAX_PASSWORD_LENGTH || (\PASSWORD_BCRYPT === $this->algo && 72 < \strlen($raw))) {
7979
throw new BadCredentialsException('Invalid password.');
8080
}
8181

0 commit comments

Comments
 (0)