Skip to content

Commit b969caa

Browse files
committed
security: check if external app user already exists
1 parent 4ae8153 commit b969caa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

websiteFunctions/website.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,16 @@ def submitWebsiteCreation(self, userID=None, data=None):
215215
except:
216216
apacheBackend = "0"
217217

218+
import pwd
219+
counter = 0
220+
while 1:
221+
try:
222+
pwd.getpwnam(externalApp)
223+
externalApp = '%s%s' % (externalApp, str(counter))
224+
counter = counter + 1
225+
except:
226+
break
227+
218228
## Create Configurations
219229

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

0 commit comments

Comments
 (0)