summary refs log tree commit diff
path: root/synapse/push/push_rule_evaluator.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/push/push_rule_evaluator.py')
-rw-r--r--synapse/push/push_rule_evaluator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/push/push_rule_evaluator.py b/synapse/push/push_rule_evaluator.py

index 49ecb38522..ae077af5b5 100644 --- a/synapse/push/push_rule_evaluator.py +++ b/synapse/push/push_rule_evaluator.py
@@ -230,7 +230,8 @@ def _glob_to_re(glob: str, word_boundary: bool) -> Pattern: if IS_GLOB.search(glob): r = re.escape(glob) - r = r.replace(r"\*", ".*?") + # replace 1 or more repeats of `\*` with `.*?` + r = re.sub(r"(\\\*)+", ".*?", r) r = r.replace(r"\?", ".") # handle [abc], [a-z] and [!a-z] style ranges.