From 6fcded5e3e713e80075a5f693bd7ec38b16f281e Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Wed, 26 May 2021 15:42:26 +0500 Subject: [PATCH 01/30] update lscpd to resolve https://forums.cyberpanel.net/discussion/5431/tls-robot-vulnerability-detected --- plogical/upgrade.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plogical/upgrade.py b/plogical/upgrade.py index 2033d3515..18c1948c3 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -455,8 +455,8 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout'; count = count + 1 if count == 3: break - else: - break + else: + break ###### iPath = os.listdir('/usr/local/CyberCP/public/rainloop/rainloop/v/') From 719eb738664a8158e5035b7082ecc2e6bdb73c22 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Thu, 27 May 2021 11:31:45 +0500 Subject: [PATCH 02/30] remove mount tmp --- plogical/upgrade.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plogical/upgrade.py b/plogical/upgrade.py index 18c1948c3..92b616321 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -2495,7 +2495,7 @@ vmail Upgrade.executioner(command, 'stop lscpd', 0) Upgrade.fixSudoers() - Upgrade.mountTemp() + #Upgrade.mountTemp() Upgrade.dockerUsers() Upgrade.setupComposer() From b4674e534148f15c39b04b8d19f6fd130264c1d1 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Thu, 27 May 2021 22:05:57 +0500 Subject: [PATCH 03/30] bring back mount tmp --- install/install.py | 2 +- plogical/upgrade.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/install.py b/install/install.py index af2ebbb1f..826b05870 100755 --- a/install/install.py +++ b/install/install.py @@ -2212,7 +2212,7 @@ def main(): distro = get_distro() checks = preFlightsChecks("/usr/local/lsws/", args.publicip, "/usr/local", cwd, "/usr/local/CyberCP", distro, remotemysql, mysqlhost, mysqldb, mysqluser, mysqlpassword, mysqlport) - #checks.mountTemp() + checks.mountTemp() if args.port == None: port = "8090" diff --git a/plogical/upgrade.py b/plogical/upgrade.py index 92b616321..18c1948c3 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -2495,7 +2495,7 @@ vmail Upgrade.executioner(command, 'stop lscpd', 0) Upgrade.fixSudoers() - #Upgrade.mountTemp() + Upgrade.mountTemp() Upgrade.dockerUsers() Upgrade.setupComposer() From 37823c3e64511eaa4e08f4053ae781b71c1e0364 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Sat, 29 May 2021 01:00:32 +0500 Subject: [PATCH 04/30] bug fix: some design issues --- .../templates/baseTemplate/index.html | 74 +++---------------- plogical/httpProc.py | 2 + 2 files changed, 12 insertions(+), 64 deletions(-) diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index 0ee2436eb..70a269a00 100755 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -90,7 +90,8 @@ - + {% block styles %} {% endblock %} @@ -115,11 +116,6 @@ -
- - - -
@@ -174,7 +170,6 @@
-
@@ -203,60 +198,20 @@
-
- -
-
- {$ one $} - {$ two $} - {$ three $} @@ -324,20 +279,19 @@ -
+
+
@@ -740,7 +694,7 @@ {% endif %} - + {% if admin %} @@ -1047,10 +1001,8 @@ {% endif %} - -
@@ -1061,13 +1013,8 @@
- - - - - @@ -1084,7 +1031,6 @@ - diff --git a/plogical/httpProc.py b/plogical/httpProc.py index 2224101a4..20e0a4604 100755 --- a/plogical/httpProc.py +++ b/plogical/httpProc.py @@ -19,6 +19,7 @@ class httpProc: from plogical.acl import ACLManager currentACL = ACLManager.loadedACL(userID) + admin = Administrator.objects.get(pk=userID) ### Permissions Check @@ -38,6 +39,7 @@ class httpProc: ipData = f.read() ipAddress = ipData.split('\n', 1)[0] self.data['ipAddress'] = ipAddress + self.data['fullName'] = '%s %s' % (admin.firstName, admin.lastName) self.data.update(currentACL) From 738c61535a02006758dc785c9a947f4b65a1140f Mon Sep 17 00:00:00 2001 From: WhatTheServer Date: Tue, 1 Jun 2021 17:58:53 -0400 Subject: [PATCH 05/30] Update fixperms.sh update to user:nobody for public_html --- CPScripts/fixperms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CPScripts/fixperms.sh b/CPScripts/fixperms.sh index 37c2f5da2..e1ceefdac 100644 --- a/CPScripts/fixperms.sh +++ b/CPScripts/fixperms.sh @@ -194,7 +194,7 @@ fixperms_cyberpanel () { echo "Fixing public_html...." tput sgr0 #Fix perms of public_html itself - chown "$verbose" "$account":"$account" "$HOMEDIR"/public_html + chown "$verbose" "$account":nobody "$HOMEDIR"/public_html chmod "$verbose" 755 "$HOMEDIR"/public_html tput bold From 147817d04b7219abf6a97404e79ae02b149085a6 Mon Sep 17 00:00:00 2001 From: WhatTheServer Date: Wed, 2 Jun 2021 08:44:04 -0400 Subject: [PATCH 06/30] Update install.py midnight is better then 12noon local server/UTC time incorporating changes from https://github.com/usmannasir/cyberpanel/pull/632 --- install/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install.py b/install/install.py index 826b05870..01b055e19 100755 --- a/install/install.py +++ b/install/install.py @@ -1678,7 +1678,7 @@ imap_folder_list_limit = 0 0 2 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/upgradeCritical.py >/dev/null 2>&1 0 2 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/renew.py >/dev/null 2>&1 7 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null -0 12 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Daily +0 0 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Daily 0 0 * * 0 /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Weekly */3 * * * * if ! find /home/*/public_html/ -maxdepth 2 -type f -newer /usr/local/lsws/cgid -name '.htaccess' -exec false {} +; then /usr/local/lsws/bin/lswsctrl restart; fi """ From 2f77fe6b82ef38ccec648923d529a4679e43b416 Mon Sep 17 00:00:00 2001 From: WhatTheServer Date: Wed, 2 Jun 2021 08:45:13 -0400 Subject: [PATCH 07/30] Update upgrade.py Update upgrade to look for 12noon and set to midnight for daily backups --- plogical/upgrade.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plogical/upgrade.py b/plogical/upgrade.py index 18c1948c3..19c82b0dc 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -2398,7 +2398,7 @@ vmail 0 2 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/upgradeCritical.py >/dev/null 2>&1 0 2 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/renew.py >/dev/null 2>&1 7 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null -0 12 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Daily +0 0 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Daily 0 0 * * 0 /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Weekly """ writeToFile = open(cronPath, 'w') From 258fc84742ef6689b4fbd29bccf124238ef45baa Mon Sep 17 00:00:00 2001 From: Joe Regan WebProJoe Date: Mon, 7 Jun 2021 10:42:37 -0500 Subject: [PATCH 08/30] Make file manager logo link back to website panel --- filemanager/templates/filemanager/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filemanager/templates/filemanager/index.html b/filemanager/templates/filemanager/index.html index 9d85987e4..00fba9a4f 100755 --- a/filemanager/templates/filemanager/index.html +++ b/filemanager/templates/filemanager/index.html @@ -41,7 +41,7 @@