# The ninth change: on WordPress's paths, some fields skip the rules that refused # ordinary WordPress requests there. Each exclusion runs with the request, before # the rules it switches off, so this file is loaded before the Core Rule Set's # rules. Each comment names a request the rule refused. All but the first apply # only while SWW_WAF_BODY_LIMIT is set, since they name fields of a body. # The block editor saves a post with POST and the header X-HTTP-Method-Override: # PUT, which the Core Rule Set refused (920450). So does saving a user's editor # preferences. SecRule REQUEST_FILENAME "@beginsWith /wp-json/" \ "id:900700,phase:1,pass,nolog,\ ctl:ruleRemoveTargetById=920450;REQUEST_HEADERS_NAMES:X-HTTP-Method-Override" # The block editor sends a post's HTML in the JSON field content, which skips # these rules when saving or autosaving a post, a page or another type of post: # 930120: cat /etc/hosts # 932230: a code block with a shell pipeline and an SQL query # 932250: the same code block # 934100: console.log('ok') # 941100: