mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 13:25:51 +01:00
fix csf menu while upgrade
This commit is contained in:
@@ -96,8 +96,9 @@ class secMiddleware:
|
||||
|
||||
response = self.get_response(request)
|
||||
|
||||
#response['Strict-Transport-Security'] = "max-age=31536000; includeSubDomains; preload"
|
||||
response['X-XSS-Protection'] = "1; mode=block"
|
||||
response['Strict-Transport-Security'] = "max-age=31536000; includeSubDomains; preload"
|
||||
response['X-Frame-Options'] = "DENY"
|
||||
response['X-Frame-Options'] = "sameorigin"
|
||||
response['Content-Security-Policy'] = "frame-ancestors jsdelivr.com"
|
||||
|
||||
return response
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
<h2>{% trans "Restore Remote Incremental Backups" %} - <a target="_blank"
|
||||
href="https://cyberpanel.net/docs/2-create-restore-incremental-backups/"
|
||||
href="https://cyberpanel.net/docs/3-restore-backups-from-remote-destination/"
|
||||
style="height: 23px;line-height: 21px;"
|
||||
class="btn btn-border btn-alt border-red btn-link font-red"
|
||||
title=""><span>{% trans "Backup Docs" %}</span></a>
|
||||
|
||||
@@ -51,8 +51,9 @@ class SSHServer(multi.Thread):
|
||||
def recvData(self):
|
||||
while True:
|
||||
try:
|
||||
if self.websocket.running:
|
||||
if os.path.exists(self.websocket.verifyPath):
|
||||
if self.websocket.filePassword == self.websocket.filePassword:
|
||||
if self.websocket.filePassword == self.websocket.password:
|
||||
if self.shell.recv_ready():
|
||||
if self.color == 0:
|
||||
text = '%sEnjoy your accelerated Internet by CyberPanel and LiteSpeed%s' % (SSHServer.OKGREEN, SSHServer.ENDC)
|
||||
@@ -63,6 +64,8 @@ class SSHServer(multi.Thread):
|
||||
self.websocket.sendMessage(self.shell.recv(9000).decode("utf-8"))
|
||||
else:
|
||||
time.sleep(0.01)
|
||||
else:
|
||||
return 0
|
||||
except BaseException, msg:
|
||||
time.sleep(0.1)
|
||||
|
||||
@@ -84,12 +87,13 @@ class WebTerminalServer(WebSocket):
|
||||
self.filePassword = open(self.verifyPath, 'r').read()
|
||||
else:
|
||||
if os.path.exists(self.verifyPath):
|
||||
if self.filePassword == self.filePassword:
|
||||
if self.filePassword == self.password:
|
||||
self.shell.send(str(data['data']))
|
||||
except:
|
||||
pass
|
||||
|
||||
def handleConnected(self):
|
||||
self.running = 1
|
||||
self.sh = SSHServer(self)
|
||||
self.shell = self.sh.shell
|
||||
self.sh.start()
|
||||
@@ -97,6 +101,7 @@ class WebTerminalServer(WebSocket):
|
||||
def handleClose(self):
|
||||
try:
|
||||
os.remove(self.verifyPath)
|
||||
self.running = 0
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
@@ -2011,6 +2011,9 @@ failovermethod=priority
|
||||
except:
|
||||
pass
|
||||
|
||||
command = 'csf -uf'
|
||||
Upgrade.executioner(command, 'fix csf if there', 0)
|
||||
|
||||
Upgrade.stdOut("Upgrade Completed.")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user