Skip to content

Commit efd5e87

Browse files
committed
Add 'content' field to security middleware bypass list
- Allow replace-file API to accept file content with special chars - File content naturally contains semicolons, backticks, dollars, etc - Prevents security middleware from blocking legitimate JavaScript/PHP code - Fixes: Replace-file API returning 'Data supplied is not accepted' error
1 parent 7ba2058 commit efd5e87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CyberCP/secMiddleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def __call__(self, request):
212212
or key == 'emailMessage' or key == 'configData' or key == 'rewriteRules' \
213213
or key == 'modSecRules' or key == 'recordContentTXT' or key == 'SecAuditLogRelevantStatus' \
214214
or key == 'fileContent' or key == 'commands' or key == 'gitHost' or key == 'ipv6' or key == 'contentNow' \
215-
or key == 'time_of_day' or key == 'notification_emails' or key == 'domains':
215+
or key == 'time_of_day' or key == 'notification_emails' or key == 'domains' or key == 'content':
216216
continue
217217

218218
# Skip validation for API endpoints that need JSON structure characters

0 commit comments

Comments
 (0)