mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 13:25:51 +01:00
bug fix: issues
This commit is contained in:
@@ -145,22 +145,22 @@ if __name__ == "__main__":
|
|||||||
writeToFile.write(str(os.getpid()))
|
writeToFile.write(str(os.getpid()))
|
||||||
writeToFile.close()
|
writeToFile.close()
|
||||||
|
|
||||||
SSHServer.findSSHPort()
|
# SSHServer.findSSHPort()
|
||||||
|
#
|
||||||
http_server = tornado.httpserver.HTTPServer(application, ssl_options={
|
# http_server = tornado.httpserver.HTTPServer(application, ssl_options={
|
||||||
"certfile": "/usr/local/lscp/conf/cert.pem",
|
# "certfile": "/usr/local/lscp/conf/cert.pem",
|
||||||
"keyfile": "/usr/local/lscp/conf/key.pem",
|
# "keyfile": "/usr/local/lscp/conf/key.pem",
|
||||||
}, )
|
# }, )
|
||||||
|
#
|
||||||
ADDR = '0.0.0.0'
|
# ADDR = '0.0.0.0'
|
||||||
http_server.listen(5678, ADDR)
|
# http_server.listen(5678, ADDR)
|
||||||
print('*** Websocket Server Started at %s***' % ADDR)
|
# print('*** Websocket Server Started at %s***' % ADDR)
|
||||||
|
#
|
||||||
import signal
|
# import signal
|
||||||
def close_sig_handler(signal, frame):
|
# def close_sig_handler(signal, frame):
|
||||||
http_server.stop()
|
# http_server.stop()
|
||||||
sys.exit()
|
# sys.exit()
|
||||||
|
#
|
||||||
signal.signal(signal.SIGINT, close_sig_handler)
|
# signal.signal(signal.SIGINT, close_sig_handler)
|
||||||
|
#
|
||||||
tornado.ioloop.IOLoop.instance().start()
|
# tornado.ioloop.IOLoop.instance().start()
|
||||||
@@ -654,3 +654,4 @@ app.controller('versionManagment', function ($scope, $http, $timeout) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -736,21 +736,21 @@
|
|||||||
|
|
||||||
<li class="header"><span>{% trans "Server" %}</span></li>
|
<li class="header"><span>{% trans "Server" %}</span></li>
|
||||||
|
|
||||||
<li>
|
{# <li>#}
|
||||||
<a href="#" title="{% trans 'Terminal' %}">
|
{# <a href="#" title="{% trans 'Terminal' %}">#}
|
||||||
<i class="glyph-icon icon-linecons-fire"></i>
|
{# <i class="glyph-icon icon-linecons-fire"></i>#}
|
||||||
<span>{% trans "Web Terminal" %}</span>
|
{# <span>{% trans "Web Terminal" %}</span>#}
|
||||||
<span class="bs-label badge-yellow">{% trans "NEW" %}</span>
|
{# <span class="bs-label badge-yellow">{% trans "NEW" %}</span>#}
|
||||||
</a>
|
{# </a>#}
|
||||||
<div class="sidebar-submenu">
|
{# <div class="sidebar-submenu">#}
|
||||||
|
{##}
|
||||||
<ul>
|
{# <ul>#}
|
||||||
<li><a href="{% url 'terminal' %}"
|
{# <li><a href="{% url 'terminal' %}"#}
|
||||||
title="{% trans 'Web Based Terminal' %}"><span>{% trans "Terminal" %}</span></a>
|
{# title="{% trans 'Web Based Terminal' %}"><span>{% trans "Terminal" %}</span></a>#}
|
||||||
</li>
|
{# </li>#}
|
||||||
</ul>
|
{# </ul>#}
|
||||||
</div><!-- .sidebar-submenu -->
|
{# </div><!-- .sidebar-submenu -->#}
|
||||||
</li>
|
{# </li>#}
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="#" title="{% trans 'CloudLinux' %}">
|
<a href="#" title="{% trans 'CloudLinux' %}">
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ def getAdminStatus(request):
|
|||||||
val = request.session['userID']
|
val = request.session['userID']
|
||||||
currentACL = ACLManager.loadedACL(val)
|
currentACL = ACLManager.loadedACL(val)
|
||||||
|
|
||||||
|
|
||||||
if os.path.exists('/home/cyberpanel/postfix'):
|
if os.path.exists('/home/cyberpanel/postfix'):
|
||||||
currentACL['emailAsWhole'] = 1
|
currentACL['emailAsWhole'] = 1
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -141,8 +141,8 @@ class EmailMarketingManager:
|
|||||||
if emACL.checkIfEMEnabled(admin.userName) == 0:
|
if emACL.checkIfEMEnabled(admin.userName) == 0:
|
||||||
return ACLManager.loadErrorJson()
|
return ACLManager.loadErrorJson()
|
||||||
|
|
||||||
em = EM('createEmailList', extraArgs)
|
# em = EM('createEmailList', extraArgs)
|
||||||
em.start()
|
# em.start()
|
||||||
|
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
|
|||||||
@@ -546,9 +546,11 @@ class FileManager:
|
|||||||
|
|
||||||
finalData = {}
|
finalData = {}
|
||||||
finalData['status'] = 1
|
finalData['status'] = 1
|
||||||
tempPath = "/home/cyberpanel/" + str(randint(1000, 9999))
|
|
||||||
self.data['home'] = '/home/%s' % (self.data['domainName'])
|
self.data['home'] = '/home/%s' % (self.data['domainName'])
|
||||||
|
|
||||||
|
ACLManager.CreateSecureDir()
|
||||||
|
tempPath = '%s/%s' % ('/usr/local/CyberCP/tmp', str(randint(1000, 9999)))
|
||||||
|
|
||||||
domainName = self.data['domainName']
|
domainName = self.data['domainName']
|
||||||
website = Websites.objects.get(domain=domainName)
|
website = Websites.objects.get(domain=domainName)
|
||||||
|
|
||||||
@@ -556,31 +558,13 @@ class FileManager:
|
|||||||
writeToFile.write(self.data['fileContent'].encode('utf-8'))
|
writeToFile.write(self.data['fileContent'].encode('utf-8'))
|
||||||
writeToFile.close()
|
writeToFile.close()
|
||||||
|
|
||||||
command = 'ls -la %s' % (self.data['fileName'])
|
command = 'chown %s:%s %s' % (website.externalApp, website.externalApp, tempPath)
|
||||||
output = ProcessUtilities.outputExecutioner(command)
|
|
||||||
|
|
||||||
if output.find('lrwxrwxrwx') > -1 and output.find('->') > -1:
|
|
||||||
return self.ajaxPre(0, 'File exists and is symlink.')
|
|
||||||
|
|
||||||
if ACLManager.commandInjectionCheck(self.data['fileName']) == 1:
|
|
||||||
return self.ajaxPre(0, 'Not allowed to move in this path, please choose location inside home!')
|
|
||||||
|
|
||||||
if self.data['fileName'].find(self.data['home']) == -1 or self.data['fileName'].find('..') > -1:
|
|
||||||
return self.ajaxPre(0, 'Not allowed to move in this path, please choose location inside home!')
|
|
||||||
|
|
||||||
command = 'stat -c "%%a" %s' % (self.returnPathEnclosed(self.data['fileName']))
|
|
||||||
currentMode = ProcessUtilities.outputExecutioner(command).strip('\n')
|
|
||||||
|
|
||||||
command = 'mv ' + tempPath + ' ' + self.returnPathEnclosed(self.data['fileName'])
|
|
||||||
ProcessUtilities.executioner(command)
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
command = 'chown %s:%s %s' % (website.externalApp, website.externalApp, self.data['fileName'])
|
command = 'cp %s %s' % (tempPath, self.returnPathEnclosed(self.data['fileName']))
|
||||||
ProcessUtilities.executioner(command)
|
ProcessUtilities.executioner(command, website.externalApp)
|
||||||
|
|
||||||
command = 'chmod %s %s' % (currentMode, self.returnPathEnclosed(self.data['fileName']))
|
os.remove(tempPath)
|
||||||
ProcessUtilities.executioner(command)
|
|
||||||
|
|
||||||
self.changeOwner(self.data['fileName'])
|
|
||||||
|
|
||||||
json_data = json.dumps(finalData)
|
json_data = json.dumps(finalData)
|
||||||
return HttpResponse(json_data)
|
return HttpResponse(json_data)
|
||||||
|
|||||||
@@ -2660,7 +2660,7 @@ vmail
|
|||||||
|
|
||||||
command = 'csf -uf'
|
command = 'csf -uf'
|
||||||
Upgrade.executioner(command, 'fix csf if there', 0)
|
Upgrade.executioner(command, 'fix csf if there', 0)
|
||||||
command = 'systemctl start cpssh'
|
command = 'systemctl stop cpssh'
|
||||||
Upgrade.executioner(command, 'fix csf if there', 0)
|
Upgrade.executioner(command, 'fix csf if there', 0)
|
||||||
Upgrade.AutoUpgradeAcme()
|
Upgrade.AutoUpgradeAcme()
|
||||||
Upgrade.installCLScripts()
|
Upgrade.installCLScripts()
|
||||||
|
|||||||
@@ -654,3 +654,4 @@ app.controller('versionManagment', function ($scope, $http, $timeout) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user