Skip to content
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

Fix local account search on LDAP login being case-sensitive #30113

Merged
merged 2 commits into from
May 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/concerns/user/ldap_authenticable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
safe_username = safe_username.gsub(keys, replacement)
end

resource = joins(:account).find_by(accounts: { username: safe_username })
resource = joins(:account).find_by('accounts.username ILIKE ?', safe_username)

Check warning on line 25 in app/models/concerns/user/ldap_authenticable.rb

View check run for this annotation

Codecov / codecov/patch

app/models/concerns/user/ldap_authenticable.rb#L25

Added line #L25 was not covered by tests
raucao marked this conversation as resolved.
Show resolved Hide resolved

if resource.blank?
resource = new(
Expand Down