Browse Source

Trim the login name

Otherwise we keep on using it with leading or trailing whitespaces for
app tokens and other logic. The reason this doesn't throw an error
immediately with local users is that (My)SQL compares strings regardless
of their padding by default. So we look up 'uid ' and get the row for
the user 'uid'.
Other back-ends will lead to a hard error, though, and the user is
unable to log out as all request fail.

Ref https://stackoverflow.com/a/10495807/2239067

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
tags/v18.0.0beta1
Christoph Wurst 4 years ago
parent
commit
81e35d0c8a
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      core/Controller/LoginController.php

+ 1
- 1
core/Controller/LoginController.php View File

@@ -289,7 +289,7 @@ class LoginController extends Controller {

$data = new LoginData(
$this->request,
$user,
trim($user),
$password,
$redirect_url,
$timezone,

Loading…
Cancel
Save