-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #24839: We cannot login with a user login containing uppercase letter if the option case-sensitivity is set to false #5655
Conversation
PR updated with a new commit |
If two user login are the same modulo case and you set
|
val sql = sql"""select * from users where id = ${userId}""" | ||
override def get(userId: String, isCaseSensitive: Boolean): IOResult[Option[UserInfo]] = { | ||
val filter = if (isCaseSensitive) fr"id = ${userId} " else fr"lower(id) = ${userId.toLowerCase()}" | ||
val sql = fr"""select * from users where""" ++ filter | ||
|
||
transactIOResult(s"Error when retrieving user information for '${userId}'")(xa => sql.query[UserInfo].option.transact(xa)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here, you need to manage the case where there is more than one result
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR updated with a new commit |
1 similar comment
PR updated with a new commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good!
OK, squash merging this PR |
…letter if the option case-sensitivity is set to false
a325e13
to
7cc61e3
Compare
https://issues.rudder.io/issues/24839
To load a user we both need to consider case-sensitivity when :
LOWER(id)