From 2ce35a3073d8b23cb874be9a6f9fb1fbd0df2ea1 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Fri, 11 Sep 2020 11:36:37 +0500 Subject: [PATCH] bug fix: fix duplicate user issue that fallback to root --- websiteFunctions/website.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index dccb93cd8..468e60a98 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -195,7 +195,7 @@ class WebsiteManager: HA = data['HA'] externalApp = 'nobody' except: - externalApp = "".join(re.findall("[a-zA-Z]+", domain))[:7] + externalApp = "".join(re.findall("[a-zA-Z]+", domain))[:5] + str(randint(1000, 9999)) @@ -223,14 +223,6 @@ class WebsiteManager: import pwd counter = 0 - while 1: - try: - pwd.getpwnam(externalApp) - externalApp = '%s%s' % (externalApp, str(counter)) - counter = counter + 1 - except: - break - ## Create Configurations execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"