mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 16:25:55 +03:00
[PR #827] [MERGED] server: Fix panic due to database collation #976
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#976
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/lldap/lldap/pull/827
Author: @nitnelave
Created: 2/2/2024
Status: ✅ Merged
Merged: 2/2/2024
Merged by: @nitnelave
Base:
main← Head:filters📝 Commits (1)
d8c5725server: Fix panic due to database collation📊 Changes
2 files changed (+49 additions, -48 deletions)
View changed files
📝
server/src/domain/sql_group_backend_handler.rs(+24 -24)📝
server/src/domain/sql_user_backend_handler.rs(+25 -24)📄 Description
When the database's collation is not "C", the DB order is not the same as the Rust order. As such, asserting that the elements are in increasing order fails. However, since both queries get the order from the database, they should be in the same order.
With too many users, the query had a giant filter
IN (u1, u2, u3, ...). In PostgreSQL, we can pass the users as an array instead, but that doesn't work with SQLite. Instead, we repeat the filter from the previous query to get the same users/groups, as a subquery.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.