fight stupidity - teach your customers not to use password == username
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -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') {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user