Skip to content

Commit

Permalink
DB name/user length to 32
Browse files Browse the repository at this point in the history
  • Loading branch information
qtwrk committed Feb 11, 2020
1 parent 01bf9fa commit bd2a0a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plogical/mysqlUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ def restoreDatabaseBackup(databaseName, tempStoragePath, dbPassword, passwordChe
def submitDBCreation(dbName, dbUsername, dbPassword, databaseWebsite):
try:

if len(dbName) > 16 or len(dbUsername) > 16:
raise BaseException("Length of Database name or Database user should be 16 at max.")
if len(dbName) > 32 or len(dbUsername) > 32:
raise BaseException("Length of Database name or Database user should be 32 at max.")

website = Websites.objects.get(domain=databaseWebsite)

Expand Down Expand Up @@ -763,4 +763,4 @@ def fetchuser(databaseName):

except BaseException as msg:
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[mysqlUtilities.fetchuser]")
return 0
return 0

0 comments on commit bd2a0a2

Please sign in to comment.