Skip to content
Permalink
Browse files

Set database length limit to 64 chars.

  • Loading branch information...
radoslav-stefanov committed Oct 7, 2019
1 parent af35508 commit 65633f6d7731166e7aa44edc4be5ae158bd1b2d0
Showing with 2 additions and 2 deletions.
  1. +2 −2 class/database.py
@@ -20,7 +20,7 @@ def AddDatabase(self,get):
try:
data_name = get['name'].strip()
if self.CheckRecycleBin(data_name): return public.returnMsg(False,'DATABASE_DEL_RECYCLE_BIN',(data_name,))
if len(data_name) > 16: return public.returnMsg(False, 'DATABASE_NAME_LEN')
if len(data_name) > 64: return public.returnMsg(False, 'DATABASE_NAME_LEN')
reg = "^[\w\.-]+$"
if not re.match(reg, data_name): return public.returnMsg(False,'DATABASE_NAME_ERR_T')
if not hasattr(get,'db_user'): get.db_user = data_name;
@@ -816,4 +816,4 @@ def AlTable(self,get):
if info:
return public.returnMsg(True,"CHANGE_SUCCESS")
else:
return public.returnMsg(False,"CHANVE_FAIL")
return public.returnMsg(False,"CHANVE_FAIL")

0 comments on commit 65633f6

Please sign in to comment.
You can’t perform that action at this time.