Skip to content

Commit

Permalink
[5.x] Fix issue if submitted password is null (#10945)
Browse files Browse the repository at this point in the history
  • Loading branch information
aerni authored Oct 14, 2024
1 parent 311fce1 commit 9a966ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Auth/Protect/Protectors/Password/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function store()
return back()->withErrors(['token' => __('statamic::messages.password_protect_token_invalid')], 'passwordProtect');
}

if (! $this->driver()->isValidPassword($this->password)) {
if (is_null($this->password) || ! $this->driver()->isValidPassword($this->password)) {
return back()->withErrors(['password' => __('statamic::messages.password_protect_incorrect_password')], 'passwordProtect');
}

Expand Down

0 comments on commit 9a966ea

Please sign in to comment.