Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Login: trim username and password to avoid trailing and ending white …
Browse files Browse the repository at this point in the history
…space problems
  • Loading branch information
cdujeu committed Nov 9, 2013
1 parent 291283e commit f36c2db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/plugins/core.auth/class.AbstractAuthDriver.php
Expand Up @@ -50,8 +50,8 @@ public function switchAction($action, $httpVars, $fileVars)
if (AuthService::suspectBruteForceLogin() && (!isSet($httpVars["captcha_code"]) || !CaptchaProvider::checkCaptchaResult($httpVars["captcha_code"]))) {
$loggingResult = -4;
} else {
$userId = (isSet($httpVars["userid"])?$httpVars["userid"]:null);
$userPass = (isSet($httpVars["password"])?$httpVars["password"]:null);
$userId = (isSet($httpVars["userid"])?trim($httpVars["userid"]):null);
$userPass = (isSet($httpVars["password"])?trim($httpVars["password"]):null);
$rememberMe = ((isSet($httpVars["remember_me"]) && $httpVars["remember_me"] == "true")?true:false);
$cookieLogin = (isSet($httpVars["cookie_login"])?true:false);
$loggingResult = AuthService::logUser($userId, $userPass, false, $cookieLogin, $httpVars["login_seed"]);
Expand Down

0 comments on commit f36c2db

Please sign in to comment.