mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
fix user in user regexp
This commit is contained in:
parent
907a62df28
commit
debf04556b
@ -405,7 +405,7 @@ class RegisterRestServlet(RestServlet):
|
|||||||
break
|
break
|
||||||
except SynapseError as e:
|
except SynapseError as e:
|
||||||
if e.errcode == Codes.USER_IN_USE:
|
if e.errcode == Codes.USER_IN_USE:
|
||||||
m = re.match(r'^(.*)(\d+)$', desired_username)
|
m = re.match(r'^(.*?)(\d+)$', desired_username)
|
||||||
if m:
|
if m:
|
||||||
desired_username = m.group(1) + str(
|
desired_username = m.group(1) + str(
|
||||||
int(m.group(2)) + 1
|
int(m.group(2)) + 1
|
||||||
|
Loading…
Reference in New Issue
Block a user