Skip to content

Commit

Permalink
security: check if external app user already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Feb 14, 2020
1 parent 4ae8153 commit b969caa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions websiteFunctions/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,16 @@ def submitWebsiteCreation(self, userID=None, data=None):
except:
apacheBackend = "0"

import pwd
counter = 0
while 1:
try:
pwd.getpwnam(externalApp)
externalApp = '%s%s' % (externalApp, str(counter))
counter = counter + 1
except:
break

## Create Configurations

execPath = "sudo /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
Expand Down

0 comments on commit b969caa

Please sign in to comment.