Skip to content

Commit df01dd7

Browse files
kenjisdatamweb
andauthored
fix: add UTF-8 to mb_strlen()
Other codes specify encoding. Co-authored-by: Pooya Parsa Dadashi <pooya_parsa_dadashi@yahoo.com>
1 parent af66c7b commit df01dd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Authentication/Passwords/CompositionValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function check(string $password, ?User $user = null): Result
3232
throw AuthenticationException::forUnsetPasswordLength();
3333
}
3434

35-
$passed = mb_strlen($password) >= $this->config->minimumPasswordLength;
35+
$passed = mb_strlen($password, 'UTF-8') >= $this->config->minimumPasswordLength;
3636

3737
if (! $passed) {
3838
return new Result([

0 commit comments

Comments
 (0)