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

Commit 5ff8eb9

Browse files
authored
Make sample config allowed_local_3pids regex stricter. (#9719)
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]>
1 parent 6705644 commit 5ff8eb9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

changelog.d/9719.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Make the allowed_local_3pids regex example in the sample config stricter.

docs/sample_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,9 +1246,9 @@ account_validity:
12461246
#
12471247
#allowed_local_3pids:
12481248
# - medium: email
1249-
# pattern: '.*@matrix\.org'
1249+
# pattern: '^[^@]+@matrix\.org$'
12501250
# - medium: email
1251-
# pattern: '.*@vector\.im'
1251+
# pattern: '^[^@]+@vector\.im$'
12521252
# - medium: msisdn
12531253
# pattern: '\+44'
12541254

synapse/config/registration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ def generate_config_section(self, generate_secrets=False, **kwargs):
298298
#
299299
#allowed_local_3pids:
300300
# - medium: email
301-
# pattern: '.*@matrix\\.org'
301+
# pattern: '^[^@]+@matrix\\.org$'
302302
# - medium: email
303-
# pattern: '.*@vector\\.im'
303+
# pattern: '^[^@]+@vector\\.im$'
304304
# - medium: msisdn
305305
# pattern: '\\+44'
306306

0 commit comments

Comments
 (0)