Skip to content

Commit 2ce35a3

Browse files
committed
bug fix: fix duplicate user issue that fallback to root
1 parent bb94ee8 commit 2ce35a3

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

websiteFunctions/website.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def submitWebsiteCreation(self, userID=None, data=None):
195195
HA = data['HA']
196196
externalApp = 'nobody'
197197
except:
198-
externalApp = "".join(re.findall("[a-zA-Z]+", domain))[:7]
198+
externalApp = "".join(re.findall("[a-zA-Z]+", domain))[:5] + str(randint(1000, 9999))
199199

200200

201201

@@ -223,14 +223,6 @@ def submitWebsiteCreation(self, userID=None, data=None):
223223
import pwd
224224
counter = 0
225225

226-
while 1:
227-
try:
228-
pwd.getpwnam(externalApp)
229-
externalApp = '%s%s' % (externalApp, str(counter))
230-
counter = counter + 1
231-
except:
232-
break
233-
234226
## Create Configurations
235227

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

0 commit comments

Comments
 (0)