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

Convert send_attempt to an int again #461

Merged
merged 5 commits into from
Nov 9, 2021
Merged

Conversation

DMRobertson
Copy link
Contributor

A type annotation was incorrect, and this lead me to introduce a regression in Sydent 2.5.0.

This restores the old behaviour, but converts to int at the rest level rather than within the validator. It does re-introduce a spec bug, but at least it's the old behaviour.

Fixes #460.

@DMRobertson DMRobertson requested a review from a team as a code owner November 9, 2021 12:22
Copy link
Member

@clokep clokep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable.

@DMRobertson DMRobertson merged commit 26530e0 into main Nov 9, 2021
@DMRobertson DMRobertson deleted the dmr/sendAttempt-int branch November 9, 2021 12:45
@DMRobertson
Copy link
Contributor Author

Many thanks!

@DMRobertson
Copy link
Contributor Author

@clokep asks:

Did you by any chance check if there are other situations similar to #460?

My response:

I haven't seen any in Sentry, but it wouldn't surprise me if there are.
I'll have a quick look in the spec to see if there are other v1 endpoints accepting non-strings.

Method:

@clokep
Copy link
Member

clokep commented Nov 9, 2021

matrix.org/docs/spec/identity_service/r0.3.0#deprecated-post-matrix-identity-api-v1-validate-msisdn-requesttoken takes an integer send_attempt too and might be vulnerable to the same problem.

Sounds like we should apply the same fix for this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Email validator incorrectly handling sendAttempt
2 participants