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

Fix error when encountering web pushkeys with missing endpoints #288

Merged
merged 4 commits into from
Dec 9, 2021

Conversation

squahtx
Copy link
Contributor

@squahtx squahtx commented Dec 8, 2021

Fixes #257

@squahtx squahtx requested a review from a team as a code owner December 8, 2021 18:05
clokep
clokep previously approved these changes Dec 8, 2021
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.

This seems reasonable. Is endpoint defined anywhere in the spec (or our documentation)? Is it marked as required?

@squahtx
Copy link
Contributor Author

squahtx commented Dec 8, 2021

Is endpoint defined anywhere in the spec (or our documentation)? Is it marked as required?

devices.data is pusher-specific according to the spec.
Our documentation notes that endpoint and auth are expected: https://github.com/matrix-org/sygnal/blob/main/docs/applications.md#push-key-and-expected-push-data

...and I've just noticed that there is already a check for endpoint and auth down below. The PR needs reworking.

@squahtx squahtx changed the title Reject web pushkeys with missing endpoints instead of raising an error Fix error when encountering web pushkeys with missing endpoints Dec 8, 2021
@squahtx squahtx requested a review from clokep December 8, 2021 20:11
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.

Ah, that's a better fix! Sorry for missing the extra checks!

@squahtx squahtx merged commit 2742acd into main Dec 9, 2021
@squahtx squahtx deleted the squah/reject_web_pushkeys_with_missing_endpoints branch December 9, 2021 12:59
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.

Investigate Sentry error Cannot use a string pattern on a bytes-like object
2 participants