Commit 5361735c authored by Hugh Davenport's avatar Hugh Davenport
Browse files

Trim usernames when requesting login



Through both manual login and mobileuploads

Bug #787313

Change-Id: I709d2de9644142bd5f6c78f1e0d7ba451f99de40
Signed-off-by: default avatarHugh Davenport <hugh@catalyst.net.nz>
parent ad0353a2
...@@ -48,7 +48,7 @@ if ($token == '') { ...@@ -48,7 +48,7 @@ if ($token == '') {
$username = ''; $username = '';
try { try {
$username = param_variable('username'); $username = trim(param_variable('username'));
} }
catch (ParameterException $e) { } catch (ParameterException $e) { }
......
...@@ -1142,7 +1142,7 @@ class AuthFactory { ...@@ -1142,7 +1142,7 @@ class AuthFactory {
function login_submit(Pieform $form, $values) { function login_submit(Pieform $form, $values) {
global $SESSION, $USER; global $SESSION, $USER;
$username = $values['login_username']; $username = trim($values['login_username']);
$password = $values['login_password']; $password = $values['login_password'];
$authenticated = false; $authenticated = false;
$oldlastlogin = 0; $oldlastlogin = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment