Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When submitting a wrong token to validate a phone number the error is not correct #8218

Open
matrixbot opened this issue Dec 18, 2023 · 0 comments
Labels
A-3PID Issues affecting third-party identifiers and invites O-Uncommon S-Tolerable T-Defect

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 18, 2023

This issue has been migrated from #8218.


When adding a phone number to an account, the user receive a submit_url in the response, and also a text message on the phone with a token composed by 6 digits.

When submitting a wrong token with

curl -X POST --data $'{"client_secret":"8f4285f7-ace9-4645-b545-e55e0566ab07","sid":"821337013","token":"111111"}' \
-H "Authorization: Bearer MDAxOGxvY2F0aW9uIG1hdHJp_REDACTED" \
'https://matrix-client.matrix.org/_matrix/client/unstable/add_threepid/msisdn/submit_token'

The user receive an error 400 with the following body:

{
  "errcode": "M_UNKNOWN",
  "error": "Error contacting the identity server"
}

The errcode should be more specific for instance "M_INVALID_TOKEN" (see matrix-org/sydent#292) and the error value is really confusing, because there is no identity server at all on the loop.

@matrixbot matrixbot changed the title Dummy issue When submitting a wrong token to validate a phone number the error is not correct Dec 21, 2023
@matrixbot matrixbot added A-3PID Issues affecting third-party identifiers and invites S-Tolerable O-Uncommon T-Defect labels Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-3PID Issues affecting third-party identifiers and invites O-Uncommon S-Tolerable T-Defect
Projects
None yet
Development

No branches or pull requests

1 participant