Skip to content

Commit

Permalink
Prevent the max password length validator exceeding what bcrypt can h…
Browse files Browse the repository at this point in the history
…andle
  • Loading branch information
Synchro committed Jul 25, 2024
1 parent b18f333 commit 02f7796
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Illuminate/Validation/Rules/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ public static function min($size)
*/
public function max($size)
{
if ($size > 72 && config('hashing.driver') === 'bcrypt') {
$size = 72;
}
$this->max = $size;

return $this;
Expand Down

0 comments on commit 02f7796

Please sign in to comment.