forked from MirrorHub/synapse
Use match rather than search
This commit is contained in:
parent
3c580c2b47
commit
47a9ba435d
1 changed files with 3 additions and 2 deletions
|
@ -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 a new issue