fight stupidity - teach your customers not to use password == username

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2014-05-18 11:16:35 +02:00
parent 6e4ff4705b
commit 3c8bf348d1
4 changed files with 28 additions and 3 deletions

View File

@@ -446,6 +446,9 @@ if ($page == 'overview') {
}
elseif ($password == '' && !(Settings::Get('panel.sendalternativemail') == 1 && validateEmail($alternative_email))) {
standard_error(array('stringisempty', 'mypassword'));
}
elseif ($password == $email_full) {
standard_error('passwordshouldnotbeusername');
} else {
if ($password == '') {
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
@@ -632,6 +635,10 @@ if ($page == 'overview') {
standard_error(array('stringisempty', 'mypassword'));
exit;
}
elseif ($password = $result['email_full']) {
standard_error('passwordshouldnotbeusername');
exit;
}
$password = validatePassword($password);
@@ -887,5 +894,3 @@ if ($page == 'overview') {
}
}
}
?>