Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Spec compliance: Logging in multiple times with same device ID does not invalidate old access tokens #6616

@aaronraimist

Description

@aaronraimist

https://matrix.org/docs/spec/client_server/r0.6.0#relationship-between-access-tokens-and-devices says

[When logging in] If the client sets the device_id, the server will invalidate any access token previously assigned to that device. There is therefore at most one active access token assigned to each device at any one time.

You can reproduce with:

curl -XPOST -d '{"type":"m.login.password", "user":"xxx", "password":"yyy", "device_id":"MYDEVICE"}' "https://server.com/_matrix/client/r0/login"

curl -XPOST -d '{"type":"m.login.password", "user":"xxx", "password":"yyy", "device_id":"MYDEVICE"}' "https://server.com/_matrix/client/r0/login"

Two rows are created in the access_tokens table with the same device ID but different access tokens, both of which are valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Spec-Complianceplaces where synapse does not conform to the specO-FrequentAffects or can be seen by most users regularly or impacts most users' first experienceS-MajorMajor functionality / product severely impaired, no satisfactory workaround.SecurityT-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.z-bug(Deprecated Label)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions