mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Use match rather than search
This commit is contained in:
parent
3c580c2b47
commit
47a9ba435d
@ -92,10 +92,11 @@ class _AliasRule(object):
|
||||
boolean
|
||||
"""
|
||||
|
||||
if not self._user_id_regex.search(user_id):
|
||||
# Note: The regexes are anchored at both ends
|
||||
if not self._user_id_regex.match(user_id):
|
||||
return False
|
||||
|
||||
if not self._alias_regex.search(alias):
|
||||
if not self._alias_regex.match(alias):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user