Fix #767 by refusing to validate usernames containing whitespace.
Requests anywhere else for usernames containing whitespace are unlikely now that this is fixed, and since they'll likely work anyway (as this was previously) I don't think this matters much. There might be cause for this to be in the parent class, but I think this will do for now.
|@@ -52,6 +52,10 @@ private function generateToken($username, $password, $teams)|
|public function authUser($username, $password)|
|+ // NB: This is a bit hacky!|
|+ // Don't allow usernames with whitespace|
|+ if (preg_match('/\s/', $username) !== 0)|
|+ return false;|
|if (!$this->checkAuthentication($username, $password))|
|$this->user = $username;|