diff --git a/plugins/mysql-apt/index.py b/plugins/mysql-apt/index.py index c9a3cfb39..49eab0e7f 100755 --- a/plugins/mysql-apt/index.py +++ b/plugins/mysql-apt/index.py @@ -1104,7 +1104,7 @@ def addDb(): dataAccess = args['dataAccess'].strip() ps = args['ps'].strip() - reg = "^[\w\.-]+$" + reg = "^[\w-]+$" if not re.match(reg, args['name']): return mw.returnJson(False, '数据库名称不能带有特殊符号!') checks = ['root', 'mysql', 'test', 'sys', 'panel_logs'] diff --git a/plugins/mysql-yum/index.py b/plugins/mysql-yum/index.py index 0a9754f3d..bf14c60c1 100755 --- a/plugins/mysql-yum/index.py +++ b/plugins/mysql-yum/index.py @@ -1079,7 +1079,7 @@ def addDb(): dataAccess = args['dataAccess'].strip() ps = args['ps'].strip() - reg = "^[\w\.-]+$" + reg = "^[\w-]+$" if not re.match(reg, args['name']): return mw.returnJson(False, '数据库名称不能带有特殊符号!') checks = ['root', 'mysql', 'test', 'sys', 'panel_logs']