From cd8494a9a1ee9a8a492de7c230978758a03b7c55 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Mon, 9 Oct 2017 18:17:42 +0100 Subject: [PATCH] fix regexp for log redaction to actually redact AS access_tokens etc --- synapse/http/site.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/http/site.py b/synapse/http/site.py index 4b09d7ee66..a3a2c41217 100644 --- a/synapse/http/site.py +++ b/synapse/http/site.py @@ -20,7 +20,7 @@ import logging import re import time -ACCESS_TOKEN_RE = re.compile(r'(\?.*access(_|%5[Ff])token=)[^&]*(.*)$') +ACCESS_TOKEN_RE = re.compile(r'(\?\S*?access(_|%5[Ff])token=).*?(&|\s|$)') class SynapseRequest(Request):