if username or password are blank, exit early (saves logging the failed attempt)
This commit is contained in:
parent
c260f707fd
commit
c7e2ef74f8
@ -287,6 +287,11 @@ class UserPage extends Extension {
|
||||
$pass = $_POST['pass'];
|
||||
$hash = md5(strtolower($name) . $pass);
|
||||
|
||||
if(empty($name) || empty($pass)) {
|
||||
$this->theme->display_error(400, "Error", "Username or password left blank");
|
||||
return;
|
||||
}
|
||||
|
||||
$duser = User::by_name_and_hash($name, $hash);
|
||||
if(!is_null($duser)) {
|
||||
$user = $duser;
|
||||
|
Loading…
x
Reference in New Issue
Block a user