Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Validate client_secret parameter according to spec #20

Merged
merged 3 commits into from
Jan 22, 2020

Conversation

anoadragon453
Copy link
Member

client_secret is currently not validated against the regex that is defined by the spec.

This PR does that.

@anoadragon453 anoadragon453 requested a review from a team January 17, 2020 17:59
@anoadragon453 anoadragon453 self-assigned this Jan 17, 2020
@anoadragon453
Copy link
Member Author

hrm, CI weirdness with the newspaper file. Will look on Monday

@anoadragon453 anoadragon453 force-pushed the anoa/client_secret_regex branch from 645e1a5 to 41f7501 Compare January 17, 2020 18:24
@anoadragon453
Copy link
Member Author

Nevermind, was due to branches off synapse mainline's dinsic branch instead of this repo's :)

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm other than the below.

One other thought is that it might have been better to write an assert_valid_client_secret method which raises the SynapseError if it's invalid, to save duplicating the error everywhere. but it doesn't matter too much.

synapse/util/regex.py Outdated Show resolved Hide resolved
@anoadragon453 anoadragon453 merged commit 0cc2594 into dinsic Jan 22, 2020
@anoadragon453 anoadragon453 deleted the anoa/client_secret_regex branch January 22, 2020 15:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants