MatrixSynapse/synapse
Richard van der Hoff 03318a766c
Merge pull request from GHSA-x345-32rc-8h85
* tests for push rule pattern matching

* tests for acl pattern matching

* factor out common `re.escape`

* Factor out common re.compile

* Factor out common anchoring code

* add word_boundary support to `glob_to_regex`

* Use `glob_to_regex` in push rule evaluator

NB that this drops support for character classes. I don't think anyone ever
used them.

* Improve efficiency of globs with multiple wildcards

The idea here is that we compress multiple `*` globs into a single `.*`. We
also need to consider `?`, since `*?*` is as hard to implement efficiently as
`**`.

* add assertion on regex pattern

* Fix mypy

* Simplify glob_to_regex

* Inline the glob_to_regex helper function

Signed-off-by: Dan Callahan <danc@element.io>

* Moar comments

Signed-off-by: Dan Callahan <danc@element.io>

Co-authored-by: Dan Callahan <danc@element.io>
2021-05-11 11:47:23 +02:00
..
_scripts
api Improved validation for received requests (#9817) 2021-04-23 19:20:44 +01:00
app Improved validation for received requests (#9817) 2021-04-23 19:20:44 +01:00
appservice
config Merge pull request from GHSA-x345-32rc-8h85 2021-05-11 11:47:23 +02:00
crypto
events
federation Revert "Experimental Federation Speedup (#9702)" 2021-04-28 11:38:33 +01:00
groups
handlers Fix tight loop handling presence replication. (#9900) 2021-04-28 14:42:50 +01:00
http Improved validation for received requests (#9817) 2021-04-23 19:20:44 +01:00
logging
metrics
module_api
push Merge pull request from GHSA-x345-32rc-8h85 2021-05-11 11:47:23 +02:00
replication
res/templates
rest Remove various bits of compatibility code for Python <3.6 (#9879) 2021-04-27 13:13:07 +01:00
server_notices
spam_checker_api
state
static
storage Revert "Experimental Federation Speedup (#9702)" 2021-04-28 11:38:33 +01:00
streams
util Merge pull request from GHSA-x345-32rc-8h85 2021-05-11 11:47:23 +02:00
__init__.py 1.33.1 2021-05-06 14:06:38 +01:00
event_auth.py Improved validation for received requests (#9817) 2021-04-23 19:20:44 +01:00
notifier.py
python_dependencies.py Unpin attrs dep after new version has been released (#9946) 2021-05-07 12:57:21 +01:00
server.py Remove various bits of compatibility code for Python <3.6 (#9879) 2021-04-27 13:13:07 +01:00
types.py
visibility.py