fix: Correctly check for local users' existence #1746
No reviewers
Labels
No labels
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
Wont fix
old/ci/cd
old/rust
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity!1746
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ginger/fix-local-user-existence-check"
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?
This pull request stops
services.users.exists()from erroneously returningtruefor remote users. Fixes #1745.Pull request checklist:
mainbranch, and the branch is named something other thanmain.myself, if applicable. This includes ensuring code compiles.
@ -259,3 +259,3 @@/// deactivated) account on this homeserver.#[inline]pub async fn exists(&self, user_id: &UserId) -> bool {self.db.userid_password.get(user_id).await.is_ok()Why did the old behavior here break? I'm curious why getting a password for a remote user would return Okay?
Remote users are also stored in
userid_passwordwith an empty password, for the purpose of user search. This is something I plan to change eventually, because it's a really stupid and footgun-prone way to handle it, but it was causingexiststo returntruefor remote users if Continuwuity had seen them in a room before.Oh thats a design decision for sure :3
i wonder what this button does