forked-synapse/synapse/config
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
..
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
__main__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
_base.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
_base.pyi Rename handler and config modules which end in handler/config. (#9816) 2021-04-20 14:55:20 -04:00
_util.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
account_validity.py Port "Allow users to click account renewal links multiple times without hitting an 'Invalid Token' page #74" from synapse-dinsic (#9832) 2021-04-19 19:16:34 +01:00
api.py Include m.room.create in invite_room_state for Spaces (#9710) 2021-03-30 14:03:17 +01:00
appservice.py Send some ephemeral events to appservices (#8437) 2020-10-15 12:33:28 -04:00
auth.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
cache.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
captcha.py Clean-up the template loading code. (#9200) 2021-01-27 10:59:50 -05:00
cas.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
consent.py Rename handler and config modules which end in handler/config. (#9816) 2021-04-20 14:55:20 -04:00
database.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
emailconfig.py Port "Allow users to click account renewal links multiple times without hitting an 'Invalid Token' page #74" from synapse-dinsic (#9832) 2021-04-19 19:16:34 +01:00
experimental.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
federation.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
groups.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
homeserver.py Rename handler and config modules which end in handler/config. (#9816) 2021-04-20 14:55:20 -04:00
jwt.py Rename handler and config modules which end in handler/config. (#9816) 2021-04-20 14:55:20 -04:00
key.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
logger.py Improved validation for received requests (#9817) 2021-04-23 19:20:44 +01:00
metrics.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
oidc.py Remove synapse.types.Collection (#9856) 2021-04-22 16:43:50 +01:00
password_auth_providers.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
push.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
ratelimiting.py Bugbear: Add Mutable Parameter fixes (#9682) 2021-04-08 22:38:54 +01:00
redis.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
registration.py Port "Allow users to click account renewal links multiple times without hitting an 'Invalid Token' page #74" from synapse-dinsic (#9832) 2021-04-19 19:16:34 +01:00
repository.py More robust handling of the Content-Type header for thumbnail generation (#9788) 2021-04-14 16:30:59 +01:00
room_directory.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
room.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
saml2.py Rename handler and config modules which end in handler/config. (#9816) 2021-04-20 14:55:20 -04:00
server_notices.py Rename handler and config modules which end in handler/config. (#9816) 2021-04-20 14:55:20 -04:00
server.py Allow OIDC cookies to work on non-root public baseurls (#9726) 2021-04-23 18:22:47 +01:00
spam_checker.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
sso.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
stats.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
third_party_event_rules.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
tls.py Merge pull request from GHSA-x345-32rc-8h85 2021-05-11 11:47:23 +02:00
tracer.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
user_directory.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
voip.py Add config linting script that checks for bool casing (#6203) 2019-10-23 13:22:54 +01:00
workers.py Split presence out of master (#9820) 2021-04-23 12:21:55 +01:00