Core Rule Set: WordPress's names and addresses pass on more fields (closes #245)
check / check (push) Successful in 5m18s
check / check (push) Successful in 5m18s
Each field skips only the rules its recorded requests set off: - page on all of wp-admin, and the JSON fields title, excerpt and name on /wp/v2/ routes: 930120, 932120, 932250 and 932260; - p, postId and slug on all of wp-admin, and the JSON slug on /wp/v2/ routes: 932120 and 932260, since WordPress writes these as slugs; - url on the block editor's link previews and embeds, and a commenter's url: 930120 and 932120. Every field keeps 932235. Add 61 requests recorded from WordPress 7.1.4 with these fields. Model: opus-5-5
This commit is contained in:
1 parent
3093ed8f0d
commit
ae5f891b2a
5 files changed
+342
-35
No files matched your search
@@ -102,6 +102,39 @@ SecRule REQUEST_FILENAME "@streq /wp-login.php" \
|
||||
"id:900704,phase:1,pass,nolog,chain"
|
||||
SecRule &ARGS_GET:pwd "@eq 0" "ctl:ruleRemoveTargetById=930120;ARGS:pwd"
|
||||
|
||||
# Saving through the REST API, the JSON fields title, excerpt and name skip these
|
||||
# rules. WordPress writes a slug such as htaccess or ls-la, so slug skips only
|
||||
# 932120 and 932260:
|
||||
# 930120: .htaccess
|
||||
# 932120: powershell
|
||||
# 932250: ls -la
|
||||
# 932260: python3
|
||||
SecRule TX:rest_route "@beginsWith /wp/v2/" "id:900712,phase:1,pass,nolog,chain"
|
||||
SecRule &ARGS_GET:/^json\.(?:title|excerpt|slug|name)$/ "@eq 0" \
|
||||
"ctl:ruleRemoveTargetById=930120;ARGS:/^json\.(?:title|excerpt|name)$/,\
|
||||
ctl:ruleRemoveTargetById=932120;ARGS:/^json\.(?:title|excerpt|slug|name)$/,\
|
||||
ctl:ruleRemoveTargetById=932250;ARGS:/^json\.(?:title|excerpt|name)$/,\
|
||||
ctl:ruleRemoveTargetById=932260;ARGS:/^json\.(?:title|excerpt|slug|name)$/"
|
||||
|
||||
# A comment's author gives the address of their site in url, which skips these
|
||||
# rules there:
|
||||
# 930120: http://blog.example/.htaccess
|
||||
# 932120: http://blog.example/powershell-basics/
|
||||
SecRule REQUEST_FILENAME "@streq /wp-comments-post.php" \
|
||||
"id:900713,phase:1,pass,nolog,chain"
|
||||
SecRule &ARGS_GET:url "@eq 0" \
|
||||
"ctl:ruleRemoveTargetById=930120;ARGS:url,\
|
||||
ctl:ruleRemoveTargetById=932120;ARGS:url"
|
||||
|
||||
# The block editor's link previews and embeds send an address in url, which
|
||||
# skips these rules there:
|
||||
# 930120: http://blog.example/.htaccess
|
||||
# 932120: http://blog.example/powershell-basics/
|
||||
SecRule TX:rest_route "@rx ^/(?:wp-block-editor/v1/url-details|oembed/1\.0/proxy)$" \
|
||||
"id:900714,phase:1,pass,nolog,\
|
||||
ctl:ruleRemoveTargetById=930120;ARGS:url,\
|
||||
ctl:ruleRemoveTargetById=932120;ARGS:url"
|
||||
|
||||
# The plugin and theme file editors name the file open in file, which skips
|
||||
# these rules there:
|
||||
# 930120: akismet/views/config.php
|
||||
@@ -117,9 +150,9 @@ SecRule REQUEST_FILENAME "@rx ^/wp-admin/(?:plugin|theme)-editor\.php$" \
|
||||
ctl:ruleRemoveTargetById=932260;ARGS:file,\
|
||||
ctl:ruleRemoveTargetById=941180;ARGS:file"
|
||||
|
||||
# Searches, the names of tags, categories, plugins and themes, and WordPress's
|
||||
# addresses for its own pages can hold any word. In the fields of the next three
|
||||
# rules, each request skips the rules that refused such words:
|
||||
# Searches, the names of tags, categories, plugins, themes and plugins' settings
|
||||
# pages, and addresses can hold any word. In the fields of the next three rules,
|
||||
# each request skips the rules that refused such words:
|
||||
# 930120: .htaccess
|
||||
# 932120: powershell
|
||||
# 932250: ls -la
|
||||
@@ -128,14 +161,18 @@ SecRule REQUEST_FILENAME "@rx ^/wp-admin/(?:plugin|theme)-editor\.php$" \
|
||||
# group also skip:
|
||||
# 932235: python3, in the address of a page of results
|
||||
|
||||
# All of wp-admin, and signing in.
|
||||
# All of wp-admin, and signing in. A plugin's settings page is named in page.
|
||||
# The site editor names a template in p and postId, and a plugin to install is
|
||||
# named in slug. WordPress writes these three as slugs, such as htaccess or
|
||||
# ls-la, so they skip only 932120 and 932260. Names are matched in lower case,
|
||||
# so postId is written postid.
|
||||
SecRule REQUEST_FILENAME "@rx ^/(?:wp-admin/|wp-login\.php$)" \
|
||||
"id:900707,phase:1,pass,nolog,\
|
||||
ctl:ruleRemoveTargetById=930120;ARGS:/^(?:s|search|q|term|tag|category_name|plugin|checked\[\]|theme|stylesheet|url|return|redirect_to|wp_http_referer|_wp_http_referer)$/,\
|
||||
ctl:ruleRemoveTargetById=932120;ARGS:/^(?:s|search|q|term|tag|category_name|plugin|checked\[\]|theme|stylesheet|url|return|redirect_to|wp_http_referer|_wp_http_referer)$/,\
|
||||
ctl:ruleRemoveTargetById=930120;ARGS:/^(?:s|search|q|term|tag|category_name|plugin|checked\[\]|theme|stylesheet|page|url|return|redirect_to|wp_http_referer|_wp_http_referer)$/,\
|
||||
ctl:ruleRemoveTargetById=932120;ARGS:/^(?:s|search|q|term|tag|category_name|plugin|checked\[\]|theme|stylesheet|page|p|postid|slug|url|return|redirect_to|wp_http_referer|_wp_http_referer)$/,\
|
||||
ctl:ruleRemoveTargetById=932235;ARGS:/^(?:url|return|redirect_to|wp_http_referer|_wp_http_referer)$/,\
|
||||
ctl:ruleRemoveTargetById=932250;ARGS:/^(?:s|search|q|term|tag|category_name|plugin|checked\[\]|theme|stylesheet|url|return|redirect_to|wp_http_referer|_wp_http_referer)$/,\
|
||||
ctl:ruleRemoveTargetById=932260;ARGS:/^(?:s|search|q|term|tag|category_name|plugin|checked\[\]|theme|stylesheet|url|return|redirect_to|wp_http_referer|_wp_http_referer)$/"
|
||||
ctl:ruleRemoveTargetById=932250;ARGS:/^(?:s|search|q|term|tag|category_name|plugin|checked\[\]|theme|stylesheet|page|url|return|redirect_to|wp_http_referer|_wp_http_referer)$/,\
|
||||
ctl:ruleRemoveTargetById=932260;ARGS:/^(?:s|search|q|term|tag|category_name|plugin|checked\[\]|theme|stylesheet|page|p|postid|slug|url|return|redirect_to|wp_http_referer|_wp_http_referer)$/"
|
||||
|
||||
# Every route of WordPress's own REST API, and the embed address each post links
|
||||
# to.
|
||||
|
||||
Reference in new issue
Block a user