MSC4190: appservice PUT /devices/{deviceId} creates a device with a random ID instead of the requested one #2015
Labels
No labels
Abandoned
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
bob the builder
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity#2015
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?
MSC4190: appservice
PUT /devices/{deviceId}creates a device with a random ID instead of the requested oneVersion:
main, imageforgejo.ellis.link/continuwuation/continuwuity:mainbuilt 2026-07-17T02:48Z, revision
eff454218c65ae432d10f98f8be5aa74929e546a(i.e. includes
1f5e178c3f"fix: Properly handle appservice device creation").Summary
When an appservice creates a device for one of its users via MSC4190
(
PUT /_matrix/client/v3/devices/{deviceId}withuser_idmasquerading),continuwuity returns
200 {}but the device that actually gets stored has arandomly generated device ID — not
{deviceId}from the request path(the requested
display_nameis dropped too). Every subsequent request thatmasquerades as
{deviceId}then fails:This makes every mautrix bridge with
encryption.msc4190: truecrash-loop atstartup (
/keys/upload403 on first boot,/keys/query403 on later boots),and each restart leaks one more orphaned random-ID device on the bridge bot.