mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-04 20:36:07 +01:00
Bug fix to SSL
This commit is contained in:
Binary file not shown.
Binary file not shown.
BIN
api/__init__.pyc
BIN
api/__init__.pyc
Binary file not shown.
BIN
api/admin.pyc
BIN
api/admin.pyc
Binary file not shown.
BIN
api/models.pyc
BIN
api/models.pyc
Binary file not shown.
Binary file not shown.
BIN
backup/admin.pyc
BIN
backup/admin.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
dns/__init__.pyc
BIN
dns/__init__.pyc
Binary file not shown.
BIN
dns/admin.pyc
BIN
dns/admin.pyc
Binary file not shown.
BIN
dns/models.pyc
BIN
dns/models.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ftp/__init__.pyc
BIN
ftp/__init__.pyc
Binary file not shown.
BIN
ftp/admin.pyc
BIN
ftp/admin.pyc
Binary file not shown.
BIN
ftp/models.pyc
BIN
ftp/models.pyc
Binary file not shown.
@@ -1883,6 +1883,34 @@ class preFlightsChecks:
|
||||
|
||||
return 1
|
||||
|
||||
def test_Requests(self):
|
||||
try:
|
||||
import requests
|
||||
getVersion = requests.get('https://cyberpanel.net/version.txt')
|
||||
latest = getVersion.json()
|
||||
except BaseException,msg:
|
||||
|
||||
command = "pip uninstall --yes requests"
|
||||
subprocess.call(shlex.split(command))
|
||||
|
||||
command = "pip install requests==2.2.1"
|
||||
res = subprocess.call(shlex.split(command))
|
||||
|
||||
if res == 1:
|
||||
print("###############################################")
|
||||
print(" Requests Test Ran ")
|
||||
print("###############################################")
|
||||
else:
|
||||
print("###############################################")
|
||||
print(" Request Test Fail ")
|
||||
print("###############################################")
|
||||
|
||||
|
||||
|
||||
logging.InstallLog.writeToFile(str(msg) + " [test_Requests]")
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
@@ -1938,6 +1966,7 @@ def main():
|
||||
checks.install_python_requests()
|
||||
checks.install_default_keys()
|
||||
|
||||
checks.test_Requests()
|
||||
checks.download_install_CyberPanel(installCyberPanel.InstallCyberPanel.mysqlPassword)
|
||||
checks.setup_cron()
|
||||
|
||||
|
||||
@@ -489,16 +489,16 @@ msgstr "Upotreba"
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:34
|
||||
#: baseTemplate/templates/baseTemplate/index.html:221
|
||||
msgid "CPU Usage"
|
||||
msgstr "CPU"
|
||||
msgstr "CPU Upotreba"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:55
|
||||
#: baseTemplate/templates/baseTemplate/index.html:232
|
||||
msgid "Ram Usage"
|
||||
msgstr "RAM"
|
||||
msgstr "RAM Upotreba"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:74
|
||||
msgid "Disk Usage '/'"
|
||||
msgstr "Disk '/'"
|
||||
msgstr "Upotreba diska '/'"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:98
|
||||
msgid "HTTP Statistics"
|
||||
@@ -510,7 +510,7 @@ msgstr "Dostupno/Max konekcija"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:118
|
||||
msgid "Available/Max SSL Connections"
|
||||
msgstr "Dostupno/Max SSL konekcija"
|
||||
msgstr "Dostupno/Max ssl konekcija"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:127
|
||||
msgid "Requests Processing"
|
||||
@@ -994,7 +994,7 @@ msgstr "Server"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/index.html:594
|
||||
msgid "NEW"
|
||||
msgstr "NOVO"
|
||||
msgstr "Novi"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/index.html:599
|
||||
#: tuning/templates/tuning/index.html:24 tuning/templates/tuning/index.html:26
|
||||
@@ -1452,7 +1452,7 @@ msgid ""
|
||||
"On this page you can add/delete firewall rules. (By default all ports are "
|
||||
"blocked, except mentioned below)"
|
||||
msgstr ""
|
||||
"Na ovoj stranici možete dodati / izbrisati pravila firewalla. (Podrazumijevano "
|
||||
"Na ovoj stranici možete dodati / izbrisati pravila firewalla. (Podrazumevano "
|
||||
"su svi portovi blokirani, osim što je navedeno ispod)"
|
||||
|
||||
#: firewall/templates/firewall/firewall.html:19
|
||||
@@ -1498,7 +1498,7 @@ msgstr "Bezbijednost - CyberPanel"
|
||||
|
||||
#: firewall/templates/firewall/index.html:12
|
||||
msgid "Security Functions"
|
||||
msgstr "Bezbjednosne funkcije"
|
||||
msgstr "Sigurnosne funkcije"
|
||||
|
||||
#: firewall/templates/firewall/index.html:13
|
||||
msgid "Manage the security of the server on this page."
|
||||
@@ -2788,7 +2788,7 @@ msgstr "Izmijeni PHP konfiguracije"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:486
|
||||
msgid "Edit vHost Main Configurations"
|
||||
msgstr "Promjena vHost glavnih podešavanja"
|
||||
msgstr ""
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:496
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:498
|
||||
@@ -2811,7 +2811,7 @@ msgstr "SLL spremljen"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:530
|
||||
msgid "Could not save SSL. Error message:"
|
||||
msgstr "Nisam mogao sačuvati SSL. Poruka o grešci:"
|
||||
msgstr ""
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:580
|
||||
msgid "Current configuration in the file fetched."
|
||||
@@ -2820,12 +2820,12 @@ msgstr ""
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:585
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:598
|
||||
msgid "Could not fetch current configuration. Error message:"
|
||||
msgstr "Nisam mogao dohvatiti trenutnu konfiguraciju. Greška poruke:"
|
||||
msgstr ""
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:594
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:649
|
||||
msgid "Configuration saved. Restart LiteSpeed put them in effect."
|
||||
msgstr "Postavke su sačuavane. Morate da restartujete LiteSpeed."
|
||||
msgstr ""
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:635
|
||||
msgid "Current rewrite rules in the file fetched."
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -199,7 +199,7 @@
|
||||
<div class="col-md-8 col-lg-6 clearfix center-margin">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<h3 class="text-transform-upr font-size-17">CyberPanel <span class="opacity-80">v 1.5</span></h3>
|
||||
<h3 class="text-transform-upr font-size-17">CyberPanel <span class="opacity-80">v 1.6</span></h3>
|
||||
<p class="font-gray">Web Hosting Control Panel</p>
|
||||
<div class="divider"></div>
|
||||
<ul class="reset-ul">
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -158,6 +158,8 @@ class sslUtilities:
|
||||
expectation.append("that you are serving files from the webroot path") #4
|
||||
expectation.append("Enter email address") #5
|
||||
expectation.append("There were too many requests") # 6
|
||||
expectation.append("--expand flag") #7
|
||||
|
||||
|
||||
try:
|
||||
|
||||
@@ -248,6 +250,11 @@ class sslUtilities:
|
||||
|
||||
elif index==6:
|
||||
return "Too many SSL requests for this domain, please try to get SSL at later time."
|
||||
elif index==7:
|
||||
command = "certbot certonly -n --agree-tos --email " + adminEmail + " --expand --webroot -w " + sslpath + " -d " + virtualHostName + " -d www." + virtualHostName
|
||||
subprocess.call(shlex.split(command))
|
||||
logging.CyberCPLogFileWriter.writeToFile(virtualHostName + " SSL OK by expanding!")
|
||||
|
||||
|
||||
|
||||
except pexpect.EOF,msg:
|
||||
|
||||
@@ -1393,6 +1393,9 @@ RewriteRule .* - [E=cache-control:max-age=120]
|
||||
|
||||
installUtilities.installUtilities.reStartLiteSpeed()
|
||||
|
||||
print "1,None"
|
||||
return
|
||||
|
||||
except BaseException, msg:
|
||||
# remove the downloaded files
|
||||
try:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -8,6 +8,8 @@ import json
|
||||
import plogical.CyberCPLogFileWriter as logging
|
||||
from plogical.installUtilities import installUtilities
|
||||
from loginSystem.models import Administrator
|
||||
import subprocess
|
||||
import shlex
|
||||
# Create your views here.
|
||||
|
||||
|
||||
@@ -104,10 +106,9 @@ def getLogsFromFile(request):
|
||||
elif type=="ftp":
|
||||
fileName="/var/log/messages"
|
||||
|
||||
fewLinesOfLogFile = logging.CyberCPLogFileWriter.readLastNFiles(50,fileName)
|
||||
|
||||
fewLinesOfLogFile = str(fewLinesOfLogFile)
|
||||
command = "sudo tail -50 " + fileName
|
||||
|
||||
fewLinesOfLogFile = subprocess.check_output(shlex.split(command))
|
||||
|
||||
status = {"logstatus":1,"logsdata":fewLinesOfLogFile}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1129,6 +1129,7 @@ app.controller('websitePages', function($scope,$http) {
|
||||
//////// Application Installation part
|
||||
|
||||
$scope.installationDetailsForm = true;
|
||||
$scope.installationDetailsFormJoomla = true;
|
||||
$scope.applicationInstallerLoading = true;
|
||||
$scope.installationFailed = true;
|
||||
$scope.installationSuccessfull = true;
|
||||
@@ -1138,8 +1139,15 @@ app.controller('websitePages', function($scope,$http) {
|
||||
|
||||
$scope.installationDetails = function(){
|
||||
|
||||
$scope.installationDetailsForm = false;
|
||||
$scope.installationDetailsForm = !$scope.installationDetailsForm;
|
||||
$scope.installationDetailsFormJoomla = true;
|
||||
|
||||
}
|
||||
|
||||
$scope.installationDetailsJoomla = function(){
|
||||
|
||||
$scope.installationDetailsFormJoomla = !$scope.installationDetailsFormJoomla;
|
||||
$scope.installationDetailsForm = true;
|
||||
|
||||
}
|
||||
|
||||
@@ -1224,6 +1232,95 @@ app.controller('websitePages', function($scope,$http) {
|
||||
|
||||
};
|
||||
|
||||
$scope.installJoomla = function(){
|
||||
|
||||
|
||||
$scope.installationDetailsFormJoomla = false;
|
||||
$scope.applicationInstallerLoading = false;
|
||||
$scope.installationFailed = true;
|
||||
$scope.installationSuccessfull = true;
|
||||
$scope.couldNotConnect = true;
|
||||
|
||||
var domain = $("#domainNamePage").text();
|
||||
var path = $scope.installPath;
|
||||
var sitename = $scope.sitename
|
||||
var username = $scope.username
|
||||
var password = $scope.password
|
||||
var prefix = $scope.prefix
|
||||
|
||||
|
||||
url = "/websites/installJoomla";
|
||||
|
||||
var home = "1";
|
||||
|
||||
if (typeof path != 'undefined'){
|
||||
home = "0";
|
||||
}
|
||||
|
||||
|
||||
var data = {
|
||||
domain: domain,
|
||||
home:home,
|
||||
path:path,
|
||||
sitename:sitename,
|
||||
username:username,
|
||||
password:password,
|
||||
prefix:prefix,
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers : {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
if (response.data.installStatus == 1)
|
||||
{
|
||||
if (typeof path != 'undefined'){
|
||||
$scope.installationURL = "http://"+domain+"/"+path;
|
||||
}
|
||||
else{
|
||||
$scope.installationURL = domain;
|
||||
}
|
||||
|
||||
$scope.installationDetailsFormJoomla = false;
|
||||
$scope.applicationInstallerLoading = true;
|
||||
$scope.installationFailed = true;
|
||||
$scope.installationSuccessfull = false;
|
||||
$scope.couldNotConnect = true;
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
$scope.installationDetailsFormJoomla = false;
|
||||
$scope.applicationInstallerLoading = true;
|
||||
$scope.installationFailed = false;
|
||||
$scope.installationSuccessfull = true;
|
||||
$scope.couldNotConnect = true;
|
||||
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
$scope.installationDetailsFormJoomla = false;
|
||||
$scope.applicationInstallerLoading = true;
|
||||
$scope.installationFailed = true;
|
||||
$scope.installationSuccessfull = true;
|
||||
$scope.couldNotConnect = false;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
BIN
tuning/admin.pyc
BIN
tuning/admin.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user