Skip to content

Conversation

@ChristophWurst
Copy link
Member

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

Copy link
Member

@georgehrke georgehrke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🐘

@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Nov 27, 2019
@ChristophWurst
Copy link
Member Author

/backport to stable17

@ChristophWurst
Copy link
Member Author

/backport to stable16

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]>
@rullzer rullzer force-pushed the fix/trim-login-name branch from 1db73ba to 81e35d0 Compare November 28, 2019 19:52
@georgehrke
Copy link
Member

@rullzer merge?

@rullzer rullzer merged commit 44fc962 into master Nov 29, 2019
@rullzer rullzer deleted the fix/trim-login-name branch November 29, 2019 07:47
@backportbot-nextcloud
Copy link

backport to stable17 in #18156

@backportbot-nextcloud
Copy link

The backport to stable16 failed. Please do this backport manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug feature: authentication feature: users and groups

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants