mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-24 03:05:48 +00:00
Use match rather than search
This commit is contained in:
parent
3c580c2b47
commit
47a9ba435d
@ -92,10 +92,11 @@ class _AliasRule(object):
|
|||||||
boolean
|
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
|
return False
|
||||||
|
|
||||||
if not self._alias_regex.search(alias):
|
if not self._alias_regex.match(alias):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user