Skip to content

Commit

Permalink
Make sample config allowed_local_3pids regex stricter. (matrix-org#9719)
Browse files Browse the repository at this point in the history
The regex should be terminated so that subdomain matches of another
domain are not accepted. Just ensuring that someone doesn't shoot
themselves in the foot by copying our example.

Signed-off-by: Denis Kasak <[email protected]>
  • Loading branch information
dkasak authored Mar 31, 2021
1 parent 6705644 commit 5ff8eb9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/9719.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make the allowed_local_3pids regex example in the sample config stricter.
4 changes: 2 additions & 2 deletions docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1246,9 +1246,9 @@ account_validity:
#
#allowed_local_3pids:
# - medium: email
# pattern: '.*@matrix\.org'
# pattern: '^[^@]+@matrix\.org$'
# - medium: email
# pattern: '.*@vector\.im'
# pattern: '^[^@]+@vector\.im$'
# - medium: msisdn
# pattern: '\+44'

Expand Down
4 changes: 2 additions & 2 deletions synapse/config/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ def generate_config_section(self, generate_secrets=False, **kwargs):
#
#allowed_local_3pids:
# - medium: email
# pattern: '.*@matrix\\.org'
# pattern: '^[^@]+@matrix\\.org$'
# - medium: email
# pattern: '.*@vector\\.im'
# pattern: '^[^@]+@vector\\.im$'
# - medium: msisdn
# pattern: '\\+44'
Expand Down

0 comments on commit 5ff8eb9

Please sign in to comment.