From 129c87a98ece84895ec5f2169b820258abd2717f Mon Sep 17 00:00:00 2001 From: Muttahir Aon Syed Date: Tue, 12 May 2020 20:30:57 +0500 Subject: [PATCH 1/8] Fixed litespeed repo version during install Updated litespeed-repo RPM from 1.1 to 1.2 --- cyberpanel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index dc0529b43..004c5dac4 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -246,7 +246,7 @@ if [[ $SERVER_COUNTRY == "CN" ]] ; then sed -i 's|wget http://rpms.litespeedtech.com/debian/|wget --no-check-certificate https://rpms.litespeedtech.com/debian/|g' install.py sed -i 's|https://repo.powerdns.com/repo-files/centos-auth-42.repo|https://'$DOWNLOAD_SERVER'/powerdns/powerdns.repo|g' installCyberPanel.py sed -i 's|https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip|https://'$DOWNLOAD_SERVER'/misc/rainloop-community-latest.zip|g' install.py - sed -i 's|rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm|curl -o /etc/yum.repos.d/litespeed.repo https://'$DOWNLOAD_SERVER'/litespeed/litespeed.repo|g' install.py + sed -i 's|rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.2-1.el7.noarch.rpm|curl -o /etc/yum.repos.d/litespeed.repo https://'$DOWNLOAD_SERVER'/litespeed/litespeed.repo|g' install.py sed -i 's|https://copr.fedorainfracloud.org/coprs/copart/restic/repo/epel-7/copart-restic-epel-7.repo|https://'$DOWNLOAD_SERVER'/restic/restic.repo|g' install.py sed -i 's|yum -y install http://cyberpanel.sh/gf-release-latest.gf.el7.noarch.rpm|wget -O /etc/yum.repos.d/gf.repo https://'$DOWNLOAD_SERVER'/gf-plus/gf.repo|g' install.py sed -i 's|dovecot-2.3-latest|dovecot-2.3-latest-mirror|g' install.py From 1cd065298d64dc1d5a2cfa12dc4444f75e623ecf Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Wed, 13 May 2020 01:42:41 +0500 Subject: [PATCH 2/8] update repo version for cent7 --- install/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install.py b/install/install.py index 724897789..bef8f5683 100755 --- a/install/install.py +++ b/install/install.py @@ -327,7 +327,7 @@ class preFlightsChecks: os._exit(os.EX_SOFTWARE) elif self.distro == centos: - command = 'rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm' + command = 'rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.2-1.el7.noarch.rpm' preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR) elif self.distro == cent8: command = 'rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm' From 9745f95d3cc77a6b7b2f7ae3a5721e03f6307122 Mon Sep 17 00:00:00 2001 From: nightwalker89 <38405415+nightwalker89@users.noreply.github.com> Date: Wed, 20 May 2020 12:25:27 +0700 Subject: [PATCH 3/8] fix ius el7 repo --- cyberpanel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 004c5dac4..3ca3db352 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -445,7 +445,7 @@ if [[ $DEV == "ON" ]] ; then if [[ $SERVER_COUNTRY == "CN" ]] ; then wget -O /etc/yum.repos.d/ius.repo https://$DOWNLOAD_SERVER/ius/ius.repo else - yum -y install https://centos7.iuscommunity.org/ius-release.rpm + yum -y install https://repo.ius.io/ius-release-el7.rpm fi yum -y install python36u python36u-pip python36u-devel check_return From 2338f1a6b4cc21355b052a65fa20f76183cf331e Mon Sep 17 00:00:00 2001 From: Muttahir Aon Syed Date: Wed, 20 May 2020 10:33:39 +0500 Subject: [PATCH 4/8] Fixed IUS Repo Location --- cyberpanel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 87fad78fe..c3372abab 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -445,7 +445,7 @@ if [[ $DEV == "ON" ]] ; then if [[ $SERVER_COUNTRY == "CN" ]] ; then wget -O /etc/yum.repos.d/ius.repo https://$DOWNLOAD_SERVER/ius/ius.repo else - yum -y install https://centos7.iuscommunity.org/ius-release.rpm + yum -y install https://repo.ius.io/ius-release-el7.rpm fi yum -y install python36u python36u-pip python36u-devel check_return From fb9a3fc2efdfe9961781000af7cf0773f44e2185 Mon Sep 17 00:00:00 2001 From: Istiak Ferdous <30789544+istiak101@users.noreply.github.com> Date: Fri, 22 May 2020 11:29:36 +0600 Subject: [PATCH 5/8] Update views.py --- api/views.py | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/api/views.py b/api/views.py index e80fa5927..49758343e 100755 --- a/api/views.py +++ b/api/views.py @@ -19,6 +19,7 @@ from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging from plogical.processUtilities import ProcessUtilities from django.views.decorators.csrf import csrf_exempt from userManagment.views import submitUserCreation as suc +from userManagment.views import submitUserDeletion as duc # Create your views here. @csrf_exempt @@ -119,7 +120,6 @@ def changeUserPassAPI(request): data = json.loads(request.body) - websiteOwner = data['websiteOwner'] ownerPassword = data['ownerPassword'] @@ -155,6 +155,37 @@ def changeUserPassAPI(request): json_data = json.dumps(data_ret) return HttpResponse(json_data) +@csrf_exempt +def submitUserDeletion(request): + try: + if request.method == 'POST': + + data = json.loads(request.body) + + adminUser = data['adminUser'] + adminPass = data['adminPass'] + + admin = Administrator.objects.get(userName=adminUser) + + if admin.api == 0: + data_ret = {"status": 0, 'error_message': "API Access Disabled."} + json_data = json.dumps(data_ret) + return HttpResponse(json_data) + + if hashPassword.check_password(admin.password, adminPass): + request.session['userID'] = admin.pk + return duc(request) + else: + data_ret = {"status": 0, + 'error_message': "Could not authorize access to API"} + json_data = json.dumps(data_ret) + return HttpResponse(json_data) + + except BaseException as msg: + data_ret = {'submitUserDeletion': 0, 'error_message': str(msg)} + json_data = json.dumps(data_ret) + return HttpResponse(json_data) + @csrf_exempt def changePackageAPI(request): try: @@ -189,8 +220,6 @@ def changePackageAPI(request): website.package = pack website.save() - - data_ret = {'changePackage': 1, 'error_message': "None"} json_data = json.dumps(data_ret) return HttpResponse(json_data) @@ -623,4 +652,4 @@ def submitUserCreation(request): except BaseException as msg: data_ret = {'changeStatus': 0, 'error_message': str(msg)} json_data = json.dumps(data_ret) - return HttpResponse(json_data) \ No newline at end of file + return HttpResponse(json_data) From 0f5498f83524ef6aa133afe1038fb0b700159820 Mon Sep 17 00:00:00 2001 From: Istiak Ferdous <30789544+istiak101@users.noreply.github.com> Date: Fri, 22 May 2020 11:31:47 +0600 Subject: [PATCH 6/8] Update urls.py --- api/urls.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/urls.py b/api/urls.py index 8caf9cb92..b694236e7 100755 --- a/api/urls.py +++ b/api/urls.py @@ -12,6 +12,7 @@ urlpatterns = [ url(r'^getUserInfo$', views.getUserInfo, name='getUserInfo'), url(r'^changeUserPassAPI', views.changeUserPassAPI, name='changeUserPassAPI'), + url(r'^submitUserDeletion$', views.submitUserDeletion, name='submitUserDeletion'), url(r'^changePackageAPI', views.changePackageAPI, name='changePackageAPI'), url(r'^fetchSSHkey', views.fetchSSHkey, name='fetchSSHkey'), @@ -25,4 +26,4 @@ urlpatterns = [ url(r'^runAWSBackups$', views.runAWSBackups, name='runAWSBackups'), url(r'^submitUserCreation$', views.submitUserCreation, name='submitUserCreation'), -] \ No newline at end of file +] From d74334144caff6d9bf5355fb16a708ff12a814f3 Mon Sep 17 00:00:00 2001 From: WhatTheServer Date: Fri, 22 May 2020 17:29:31 -0400 Subject: [PATCH 7/8] Update cPanelImporter.py Add PHP 74 --- plogical/cPanelImporter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plogical/cPanelImporter.py b/plogical/cPanelImporter.py index 81e2fa95a..98f92df18 100644 --- a/plogical/cPanelImporter.py +++ b/plogical/cPanelImporter.py @@ -71,7 +71,9 @@ class cPanelImporter: self.PHPVersion = 'PHP 7.2' elif self.PHPVersion.find('73') > -1: self.PHPVersion = 'PHP 7.3' - + elif self.PHPVersion.find('74') > -1: + self.PHPVersion = 'PHP 7.4' + if self.PHPVersion == '': self.PHPVersion = 'PHP 7.1' From 829c2dfb850c69df5b2668f06349af2e4adc2640 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Wed, 3 Jun 2020 13:32:16 +0200 Subject: [PATCH 8/8] Update cyberpanel.sh --- cyberpanel.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 8baa63551..04b1a576a 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -369,11 +369,13 @@ fi install_required() { -if [[ $CENTOS_8 == "True" ]] ; then - curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.0.1/install/CyberPanel8.repo > /etc/yum.repos.d/CyberPanel.repo - dnf install zip -y -elif [[ $CENTOS_8 == "False" ]] ; then - curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.0.1/install/CyberPanel.repo > /etc/yum.repos.d/CyberPanel.repo +if [[ -d /etc/yum.repos.d ]] ; then + if [[ $CENTOS_8 == "True" ]] ; then + curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.0.1/install/CyberPanel8.repo > /etc/yum.repos.d/CyberPanel.repo + dnf install zip -y + elif [[ $CENTOS_8 == "False" ]] ; then + curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.0.1/install/CyberPanel.repo > /etc/yum.repos.d/CyberPanel.repo + fi fi echo -e "\nInstalling necessary components..." @@ -1576,4 +1578,4 @@ main_install ### Disable Centos Default Repos -disable_repos \ No newline at end of file +disable_repos