diff --git a/firewall/firewallManager.py b/firewall/firewallManager.py index 9bb38e7d8..e9cf462de 100755 --- a/firewall/firewallManager.py +++ b/firewall/firewallManager.py @@ -1313,9 +1313,6 @@ def installCSF(self): userID = self.request.session['userID'] currentACL = ACLManager.loadedACL(userID) - final_dic = {'installStatus': 0, 'error_message': 'CSF install is currently disabled.'} - final_json = json.dumps(final_dic) - return HttpResponse(final_json) if currentACL['admin'] == 1: pass diff --git a/plogical/csf.py b/plogical/csf.py index 3d276db11..3bc19ad83 100755 --- a/plogical/csf.py +++ b/plogical/csf.py @@ -429,6 +429,18 @@ def configservercsfiframe(request): except: pass + sed_commands = [ + 'sed -i "s/url(r\'^configservercsf/path(\'configservercsf/g" /usr/local/CyberCP/CyberCP/urls.py', + 'sed -i "s/from django.conf.urls import url/from django.urls import path/g" /usr/local/CyberCP/configservercsf/urls.py', + 'sed -i "s/import signals/import configservercsf.signals/g" /usr/local/CyberCP/configservercsf/apps.py', + 'sed -i "s/url(r\'^$\'/path(\'\'/g" /usr/local/CyberCP/configservercsf/urls.py', + 'sed -i "s|url(r\'^iframe/$\'|path(\'iframe/\'|g" /usr/local/CyberCP/configservercsf/urls.py', + 'killall lswsgi' + ] + + for cmd in sed_commands: + ProcessUtilities.executioner(cmd) + return 1 except BaseException as msg: try: