From 188c0127d7cc0cb35c86ce562ef44ea18ff2fe14 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Mon, 4 Nov 2024 19:26:10 +0500 Subject: [PATCH] bug fix: gdrive backups --- CyberCP/secMiddleware.py | 2 +- plogical/backupSchedule.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CyberCP/secMiddleware.py b/CyberCP/secMiddleware.py index 67f3e83c7..9a712fe02 100755 --- a/CyberCP/secMiddleware.py +++ b/CyberCP/secMiddleware.py @@ -35,7 +35,7 @@ def __call__(self, request): logging.writeToFile(f'Path vs the final url : {pathActual}') logging.writeToFile(FinalURL) - if pathActual == '/' or pathActual == '/verifyLogin' or pathActual == '/logout' or pathActual.startswith('/api')\ + if pathActual == "/backup/localInitiate" or pathActual == '/' or pathActual == '/verifyLogin' or pathActual == '/logout' or pathActual.startswith('/api')\ or pathActual.endswith('/webhook') or pathActual.startswith('/cloudAPI') or pathActual.endswith('/gitNotify'): pass else: diff --git a/plogical/backupSchedule.py b/plogical/backupSchedule.py index 919bb2d1a..92f74961f 100755 --- a/plogical/backupSchedule.py +++ b/plogical/backupSchedule.py @@ -53,7 +53,7 @@ def createLocalBackup(virtualHost, backupLogPath): ### - pathToFile = "/home/cyberpanel/" + str(randint(1000, 9999)) + pathToFile = "/home/cyberpanel/" + str(randint(10**9, 10**10 - 1)) file = open(pathToFile, "w+") file.close()