MDL-15218 reset change password secret if somebody just tries to guess it; merged from MOODLE_19_STABLE
This commit is contained in:
@@ -77,6 +77,10 @@ if ($p_secret !== false) {
|
||||
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!
|
||||
$DB->set_field('user', 'secret', '', array('id'=>$user->id));
|
||||
}
|
||||
print_header($strforgotten, $strforgotten, $navigation);
|
||||
print_error('forgotteninvalidurl');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user