From a4e7756fd5deb19d285b83d5f4d44db7a443e389 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 20 Sep 2018 17:34:53 +0800 Subject: [PATCH] * finish task #4851. --- module/user/control.php | 6 +++++- module/user/view/login.html.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/module/user/control.php b/module/user/control.php index 38e8ae28f2..9288916d6c 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -779,7 +779,11 @@ class user extends control { die(js::error(sprintf($this->lang->user->lockWarning, $remainTimes))); } - die(js::error($this->lang->user->loginFailed)); + + $errorScript = js::error($this->lang->user->loginFailed); + /* Finish task #4851. */ + if($this->post->verifyRand and !isset($_SESSION['rand'])) $errorScript .= js::reload('parent'); + die($errorScript); } } else diff --git a/module/user/view/login.html.php b/module/user/view/login.html.php index 39bc1aa97a..2d2b2e2422 100644 --- a/module/user/view/login.html.php +++ b/module/user/view/login.html.php @@ -52,6 +52,7 @@ if(empty($config->notMd5Pwd))js::import($jsRoot . 'md5.js'); echo html::submitButton($lang->login, '', 'btn btn-primary'); if($app->company->guest) echo html::linkButton($lang->user->asGuest, $this->createLink($config->default->module)); echo html::hidden('referer', $referer); + echo html::hidden('verifyRand', $rand); echo html::a(inlink('reset'), $lang->user->resetPassword); ?> @@ -84,7 +85,6 @@ if(empty($config->notMd5Pwd))js::import($jsRoot . 'md5.js'); -