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

Don't block invites containing web_client_location when using "http" in the keyword block list. #545

Merged
merged 8 commits into from
Jan 9, 2023

Conversation

H-Shay
Copy link
Contributor

@H-Shay H-Shay commented Jan 6, 2023

It appears that when "http" is used in the keyword blocklist legitimate invites are being dropped if the invite contains an org.matrix.web_client_location. This pr attempts to resolve that by allowing the invite in the case that org.matrix.web_client_location is provided and the blocked keyword is http or https. Fixes #540.

@H-Shay H-Shay requested a review from a team as a code owner January 6, 2023 03:19
@H-Shay H-Shay requested a review from reivilibre January 6, 2023 19:46
Copy link
Contributor

@squahtx squahtx left a comment

Choose a reason for hiding this comment

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

It's a bit hacky but I can't think of a better alternative that allows us to filter out undesirable web_client_location URLs.

Thanks for writing a test!

changelog.d/545.misc Outdated Show resolved Hide resolved
sydent/http/servlets/store_invite_servlet.py Outdated Show resolved Hide resolved
@H-Shay H-Shay changed the title Don't block invites containing invite_client_location when using "http" in the keyword block list. Don't block invites containing web_client_location when using "http" in the keyword block list. Jan 9, 2023
@H-Shay H-Shay requested a review from squahtx January 9, 2023 16:27
Copy link
Contributor

@squahtx squahtx left a comment

Choose a reason for hiding this comment

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

lgtm!

@H-Shay H-Shay merged commit a743dab into main Jan 9, 2023
@H-Shay H-Shay deleted the shay/fix_invites branch January 9, 2023 16:36
@H-Shay
Copy link
Contributor Author

H-Shay commented Jan 9, 2023

Thanks! Merged.

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.

Invite by email fails, when synapse option: "email.invite_client_location" is set (with any value)
3 participants