Skip to content

Commit

Permalink
putting back csf, ref #1328
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Oct 2, 2024
1 parent e2bf28e commit f0a9bee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 0 additions & 3 deletions firewall/firewallManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions plogical/csf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f0a9bee

Please sign in to comment.