Skip to content

Commit

Permalink
Correct for situation where tokens have expired / do not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
barryo committed Jan 20, 2016
1 parent f942293 commit 0b4f563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OSS/Controller/Trait/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public function resetPasswordAction()
if( $user->cleanExpiredPreferences() )
$this->getD2EM()->flush();

if( !in_array( $form->getValue( 'token' ), $user->getIndexedPreference( 'tokens.password_reset' ) ) )
if( !is_array( $user->getIndexedPreference( 'tokens.password_reset' ) ) || !in_array( $form->getValue( 'token' ), $user->getIndexedPreference( 'tokens.password_reset' ) ) )
{
$this->addMessage(
'Invalid username / token combination. Please check your details and try again.',
Expand Down

0 comments on commit 0b4f563

Please sign in to comment.