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

Fix quoting for allowed_local_3pids example config #4476

Merged
merged 1 commit into from Jan 25, 2019

Conversation

Projects
None yet
3 participants
@richvdh
Copy link
Member

richvdh commented Jan 25, 2019

If you use double-quotes here, you have to escape your backslashes. It's much
easier with single-quotes.

(Note that the existing double-backslashes are already interpreted by python's
""" parsing.)

Fix quoting for allowed_local_3pids example config
If you use double-quotes here, you have to escape your backslashes. It's much
easier with single-quotes.

(Note that the existing double-backslashes are already interpreted by python's
""" parsing.)

@richvdh richvdh requested a review from matrix-org/synapse-core Jan 25, 2019

@@ -84,11 +84,11 @@ def default_config(self, generate_secrets=False, **kwargs):
#
# allowed_local_3pids:
# - medium: email
# pattern: ".*@matrix\\.org"
# pattern: '.*@matrix\\.org'

This comment has been minimized.

@erikjohnston

erikjohnston Jan 25, 2019

Member

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

This comment has been minimized.

@richvdh

richvdh Jan 25, 2019

Author Member

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.

This comment has been minimized.

@erikjohnston

erikjohnston Jan 25, 2019

Member

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

This comment has been minimized.

@erikjohnston

erikjohnston Jan 25, 2019

Member

OH sorry, I'm with you

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 25, 2019

Codecov Report

Merging #4476 into develop will increase coverage by 0.03%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #4476      +/-   ##
===========================================
+ Coverage    74.71%   74.75%   +0.03%     
===========================================
  Files          336      336              
  Lines        34056    34056              
  Branches      5538     5538              
===========================================
+ Hits         25445    25458      +13     
+ Misses        7037     7025      -12     
+ Partials      1574     1573       -1

@richvdh richvdh merged commit 4a3f138 into develop Jan 25, 2019

5 checks passed

ci/circleci: sytestpy2merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy2postgresmerged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3postgresmerged Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@richvdh richvdh deleted the rav/fix_allowed_3pids_example branch Jan 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment