mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-26 03:48:42 +00:00
fix: unset $_SESSION['phrase']
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
6fce5b6ca4
commit
0571beca45
@ -36,9 +36,13 @@ if ($_POST['image_upload_file_submit'] == 'submit') {
|
||||
}
|
||||
|
||||
if (!isset($_SESSION['phrase']) || !PhraseBuilder::comparePhrases($_SESSION['phrase'], $_POST['captcha'])) {
|
||||
unset($_SESSION['phrase']);
|
||||
|
||||
throwError("bad_captcha");
|
||||
}
|
||||
|
||||
unset($_SESSION['phrase']);
|
||||
|
||||
if ($_FILES["image_upload_file"]["error"] > 0) {
|
||||
throwError($_FILES["image_upload_file"]["error"]);
|
||||
}
|
||||
|
@ -38,9 +38,13 @@ $forgot_form->handle = function (&$vdata) {
|
||||
$password = $user["password"];
|
||||
|
||||
if (!isset($_SESSION['phrase']) || !PhraseBuilder::comparePhrases($_SESSION['phrase'], $_POST['captcha'])) {
|
||||
unset($_SESSION['phrase']);
|
||||
|
||||
becomeMsgPage('验证码错误!');
|
||||
}
|
||||
|
||||
unset($_SESSION['phrase']);
|
||||
|
||||
if (!$user['email']) {
|
||||
becomeMsgPage('用户未填写邮件地址,请联系管理员重置!');
|
||||
}
|
||||
@ -99,7 +103,6 @@ EOD;
|
||||
}
|
||||
};
|
||||
$forgot_form->submit_button_config['align'] = 'offset';
|
||||
|
||||
$forgot_form->runAtServer();
|
||||
?>
|
||||
<?php echoUOJPageHeader('找回密码') ?>
|
||||
|
Loading…
Reference in New Issue
Block a user