Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <[email protected]>
  • Loading branch information
ChristophWurst authored and Backportbot committed Nov 29, 2019
commit f28a23cdd8bbbe84c21c047a7731610e6566769e
2 changes: 1 addition & 1 deletion core/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public function tryLogin(string $user,

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