Skip to content

Commit 05f4047

Browse files
authored
Merge pull request #18183 from nextcloud/backport/18135/stable16
[stable16] Trim the login name
2 parents 56528c6 + 2dd531f commit 05f4047

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

core/Controller/LoginController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ public function tryLogin($user, $password, $redirect_url, $remember_login = true
284284
if(!is_string($user)) {
285285
throw new \InvalidArgumentException('Username must be string');
286286
}
287+
$user = trim($user);
287288

288289
// If the user is already logged in and the CSRF check does not pass then
289290
// simply redirect the user to the correct page as required. This is the

0 commit comments

Comments
 (0)