diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2019-10-03 13:48:45 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2019-10-03 13:48:45 +0100 |
commit | 6018bec9190362a038767aa7b3ef17739184f7ed (patch) | |
tree | 449e8adc4900f0f2684b732f97baee5ea0d6e8d3 /synapse/http | |
parent | Merge pull request #6154 from matrix-org/erikj/fix_appservice_pagination (diff) | |
parent | Merge tag 'v1.4.0' (diff) | |
download | synapse-6018bec9190362a038767aa7b3ef17739184f7ed.tar.xz |
Merge branch 'master' into develop
Diffstat (limited to 'synapse/http')
-rw-r--r-- | synapse/http/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/http/__init__.py b/synapse/http/__init__.py index 3acf772cd1..3880ce0d94 100644 --- a/synapse/http/__init__.py +++ b/synapse/http/__init__.py @@ -42,11 +42,13 @@ def cancelled_to_request_timed_out_error(value, timeout): ACCESS_TOKEN_RE = re.compile(r"(\?.*access(_|%5[Ff])token=)[^&]*(.*)$") +CLIENT_SECRET_RE = re.compile(r"(\?.*client(_|%5[Ff])secret=)[^&]*(.*)$") def redact_uri(uri): - """Strips access tokens from the uri replaces with <redacted>""" - return ACCESS_TOKEN_RE.sub(r"\1<redacted>\3", uri) + """Strips sensitive information from the uri replaces with <redacted>""" + uri = ACCESS_TOKEN_RE.sub(r"\1<redacted>\3", uri) + return CLIENT_SECRET_RE.sub(r"\1<redacted>\3", uri) class QuieterFileBodyProducer(FileBodyProducer): |