Skip to content

Commit

Permalink
MDL-15218 reset change password secret if somebody just tries to gues…
Browse files Browse the repository at this point in the history
…s it
  • Loading branch information
skodak committed Sep 1, 2008
1 parent 7fecd32 commit aa45463
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions login/forgot_password.php
Expand Up @@ -77,6 +77,10 @@
notice(get_string('emailpasswordsent', '', $a), $changepasswordurl);

} else {
if (!empty($user) and strlen($p_secret) === 15) {
// somebody probably tries to hack in by guessing secret - stop them!
set_field('user', 'secret', '', 'id', $user->id);
}
print_header($strforgotten, $strforgotten, $navigation);
print_error('forgotteninvalidurl');
}
Expand Down

0 comments on commit aa45463

Please sign in to comment.