Update index.py

This commit is contained in:
Mr Chen 2024-07-24 14:32:35 +08:00
parent 0912360794
commit 97a07b4955
1 changed files with 1 additions and 1 deletions

View File

@ -1337,7 +1337,7 @@ def addMasterRepSlaveUser(version=''):
if len(password) < 1:
password = mw.md5(time.time())[0:8]
if not re.match("^[\w\.-]+$", username):
if not re.match(r"^[\w\.-]+$", username):
return mw.returnJson(False, '用户名不能带有特殊符号!')
checks = ['root', 'mysql', 'test', 'sys', 'panel_logs']
if username in checks or len(username) < 1: