Open Sorunome opened 4 years ago
User-Interactive auth stages can be completed out-of-order, which is not spec-conform.
/register
m.login.dummy
sorunome@sorunome-desktop ~ $ curl -X POST -H "Content-Type: application/json" -d '{}' https://matrix.org/_matrix/client/r0/register { "flows": [ { "stages": [ "m.login.recaptcha", "m.login.terms", "m.login.dummy" ] }, { "stages": [ "m.login.recaptcha", "m.login.terms", "m.login.email.identity" ] } ], "params": { "m.login.recaptcha": { "public_key": "6LcgI54UAAAAABGdGmruw6DdOocFpYVdjYBRe4zb" }, "m.login.terms": { "policies": { "privacy_policy": { "en": { "name": "Terms and Conditions", "url": "https://matrix-client.matrix.org/_matrix/consent?v=1.0" }, "version": "1.0" } } } }, "session": "EhIvEQDoTuGsTKhslrPQJMpE" } sorunome@sorunome-desktop ~ $ curl -X POST -H "Content-Type: application/json" -d '{"auth": {"type": "m.login.dummy", "session": "EhIvEQDoTuGsTKhslrPQJMpE"}}' https://matrix.org/_matrix/client/r0/register { "completed": [ "m.login.dummy" ], "flows": [ { "stages": [ "m.login.recaptcha", "m.login.terms", "m.login.dummy" ] }, { "stages": [ "m.login.recaptcha", "m.login.terms", "m.login.email.identity" ] } ], "params": { "m.login.recaptcha": { "public_key": "6LcgI54UAAAAABGdGmruw6DdOocFpYVdjYBRe4zb" }, "m.login.terms": { "policies": { "privacy_policy": { "en": { "name": "Terms and Conditions", "url": "https://matrix-client.matrix.org/_matrix/consent?v=1.0" }, "version": "1.0" } } } }, "session": "EhIvEQDoTuGsTKhslrPQJMpE" }
current live matrix.org instance
sorunome@sorunome-desktop ~ $ curl https://matrix.org/_matrix/federation/v1/version { "server": { "name": "Synapse", "version": "1.8.0 (b=matrix-org-hotfixes,a099ab7d3)" } }
From what I've heard several clients rely on arbitrary stage order being allowed for UIA stages. I'm wondering if it wouldn't make more sense to change the spec to align with how UIA is commonly used in practice.
Description
User-Interactive auth stages can be completed out-of-order, which is not spec-conform.
Steps to reproduce
/register
to get a session id/register
, completing them.login.dummy
auth, even though taht is out of orderVersion information
current live matrix.org instance