bug: calling /createRoom with the same payload concurrently allows several rooms to own the same canonical alias #2656
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Compliance
Continuwuity/Web Interface
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
bob the builder
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity#2656
Loading…
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?
What is the bug?
While I was testing a modification to Draupnir, I ran a command that made it create a policy list room. For some reason, this command was ran twice at the same time, which made Draupnir create two rooms. However, because it created the same room twice, the
createRoompayload was the same. Normally, one of the requests would be rejected since two rooms can't have the same canonical alias, but Continuwuity happily created two identical rooms with the samem.room.canonical_alias. Obviously, because of how the db is structured, only one of these rooms actually has the canonical alias, but still one of the requests should've been rejected.This is likely due to the workaround added to v12 rooms that allowed the same room to be created in parallel. Something something singular global mutex (/j)
Steps to reproduce
/createRoomwith the same payload two or more times in the same millisecond, with the samealiasset.Server name and version
nexy7574.co.uk v26.11.0
134211d0ecAdditional context
No response