Skip to content
Permalink
Browse files

fix csf menu while upgrade

  • Loading branch information
usmannasir committed Nov 6, 2019
1 parent e4a375f commit 66c16a712b160f10ddd1676ec993b37b92a903a7
@@ -95,9 +95,10 @@ def __call__(self, request):


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,18 +51,21 @@ def __init__(self, websocket):
def recvData(self):
while True:
try:
if os.path.exists(self.websocket.verifyPath):
if self.websocket.filePassword == self.websocket.filePassword:
if self.shell.recv_ready():
if self.color == 0:
text = '%sEnjoy your accelerated Internet by CyberPanel and LiteSpeed%s' % (SSHServer.OKGREEN, SSHServer.ENDC)
nText = 'Enjoy your accelerated Internet by CyberPanel'
self.websocket.sendMessage(self.shell.recv(9000).decode("utf-8").replace(nText, text))
self.color = 1
if self.websocket.running:
if os.path.exists(self.websocket.verifyPath):
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)
nText = 'Enjoy your accelerated Internet by CyberPanel'
self.websocket.sendMessage(self.shell.recv(9000).decode("utf-8").replace(nText, text))
self.color = 1
else:
self.websocket.sendMessage(self.shell.recv(9000).decode("utf-8"))
else:
self.websocket.sendMessage(self.shell.recv(9000).decode("utf-8"))
else:
time.sleep(0.01)
time.sleep(0.01)
else:
return 0
except BaseException, msg:
time.sleep(0.1)

@@ -84,19 +87,21 @@ def handleMessage(self):
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()

def handleClose(self):
try:
os.remove(self.verifyPath)
self.running = 0
except:
pass

@@ -2011,6 +2011,9 @@ def upgrade():
except:
pass

command = 'csf -uf'
Upgrade.executioner(command, 'fix csf if there', 0)

Upgrade.stdOut("Upgrade Completed.")


0 comments on commit 66c16a7

Please sign in to comment.
You can’t perform that action at this time.