【发布时间】:2023-06-21 06:18:02
【问题描述】:
有没有办法更新 modsecurity_crs_custom.conf 文件中的规则模式?我有一个富文本编辑器,可以让人们包装链接文本。 <a href></a> 正在从 rule 973304 发出警告。我想从模式中排除href,但我不知道该怎么做。看起来没有类似SecRuleUpdatePatternById的选项
我试过了
SecRuleUpdateTargetById 973304 "XML:\b(background|dynsrc|lowsrc|src)\b\W*?="
但这显然行不通
这是警告:
Message: Access denied with code 403 (phase 2). Pattern match
"\\b(background|dynsrc|href|lowsrc|src)\\b\\W*?=" at ARGS:comment.
[file "/etc/httpd/crs/owasp- modsecurity/crs/base_rules/modsecurity_crs_41_xss_attacks.conf"]
[line "333"] [id "973304"] [rev "2"] [msg "XSS Attack Detected"]
[data "Matched Data: href= found within ARGS:comment:
txt <a href=\x22http://kslll.com/391\x22>dgfdfgfdf </a> ......
【问题讨论】:
标签: apache httpd.conf owasp mod-security