Merge pull request #18183 from nextcloud/backport/18135/stable16

[stable16] Trim the login name
This commit is contained in:
Roeland Jago Douma 2019-12-02 13:55:34 +01:00 committed by GitHub
commit 05f40475cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -284,6 +284,7 @@ class LoginController extends Controller {
if(!is_string($user)) {
throw new \InvalidArgumentException('Username must be string');
}
$user = trim($user);
// If the user is already logged in and the CSRF check does not pass then
// simply redirect the user to the correct page as required. This is the