Skip to content

Commit

Permalink
return from handlePasswordSubmission when reset link is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
creme332 committed Apr 22, 2024
1 parent 87eceef commit e5115e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controllers/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private function handleEmailSubmission(): void

/**
* Checks if password reset link contains the necessary token and id query parameters.
* @return bool
* @return bool True if valid
*/
private function validatePasswordResetLink(): bool
{
Expand All @@ -107,6 +107,7 @@ private function handlePasswordSubmission(): void
{
if (!$this->validatePasswordResetLink()) {
$this->view_data['error'] = 'Invalid password reset link';
return;
}

if (!isset($_POST['pwd'], $_POST['pwd-repeat'])) {
Expand Down

0 comments on commit e5115e5

Please sign in to comment.