WIP: Fix appservice user creation (fixes #813) #918
No reviewers
Labels
No labels
Bug
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/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status/Blocked
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
To-Merge
Wont fix
old/ci/cd
old/rust
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity!918
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-813-appservice-user-creation"
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 PR fixes issue #813 where appservice users were not being created, preventing appservices from functioning correctly:
The issue was that when an appservice registered, the corresponding user account for the
sender_localpart
was never created, which prevented:The fix should ensure that missing user accounts are created both:
@ -220,6 +220,10 @@ async fn auth_appservice(
return Err!(Request(Exclusive("User is not in namespace.")));
}
if !services.users.exists(&user_id).await {
This would create for any user in the regex, not sure we need to do that - I think the issue was the account in
sender_localpart
? Ignore me if I'm wrong hereIf it is what needs to happen, then it should only happen for exclusive namespaces to stop, e.g. doublepuppetting from accidentally creating accounts.
I completely forgot to target just the appservice's localpart for auth here, yeah. I'm just consolidating a few commits into my
tom/fixes
branch to test them all in one build, and will solve this in there.Pull request closed