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

Remove : from allowed client_secret chars #309

Merged
merged 3 commits into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/309.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sydent now correctly enforces the valid characters in the `client_secret` parameter used in various endpoints.
4 changes: 1 addition & 3 deletions sydent/util/stringutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
import re

# https://matrix.org/docs/spec/client_server/r0.6.0#post-matrix-client-r0-register-email-requesttoken
# Note: The : character is allowed here for older clients, but will be removed in a
# future release. Context: https://github.com/matrix-org/sydent/issues/247
client_secret_regex = re.compile(r"^[0-9a-zA-Z\.\=\_\-\:]+$")
client_secret_regex = re.compile(r"^[0-9a-zA-Z\.\=\_\-]+$")


def is_valid_client_secret(client_secret):
Expand Down