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

Fix quoting for allowed_local_3pids example config #4476

Merged
merged 1 commit into from
Jan 25, 2019
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/4476.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix quoting for allowed_local_3pids example config
6 changes: 3 additions & 3 deletions synapse/config/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ def default_config(self, generate_secrets=False, **kwargs):
#
# allowed_local_3pids:
# - medium: email
# pattern: ".*@matrix\\.org"
# pattern: '.*@matrix\\.org'
Copy link
Member

Choose a reason for hiding this comment

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

I'd have thought this would now have one too many escapes?

Copy link
Member Author

Choose a reason for hiding this comment

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

empirically, it now works. as per the pr description: -escapes are interpreted by python """ strings, so this ends up with single-backslashes in the yaml.

Copy link
Member

Choose a reason for hiding this comment

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

Right, but single slashes is what you want in the yaml if its going to be fed to regex?

Copy link
Member

Choose a reason for hiding this comment

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

OH sorry, I'm with you

# - medium: email
# pattern: ".*@vector\\.im"
# pattern: '.*@vector\\.im'
# - medium: msisdn
# pattern: "\\+44"
# pattern: '\\+44'

# If set, allows registration by anyone who also has the shared
# secret, even if registration is otherwise disabled.
Expand Down