Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1656 from lifeforms/xenforo-fp
Browse files Browse the repository at this point in the history
XenForo: additional exclusions
  • Loading branch information
lifeforms authored Jan 6, 2020
2 parents d489f9b + 5e7a319 commit 3cf85f6
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions rules/REQUEST-903.9006-XENFORO-EXCLUSION-RULES.conf
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ SecRule REQUEST_FILENAME "@rx /(?:conversations|(?:conversations|forums|threads)
# POST /xf/threads/thread-title.12345/add-reply
# POST /xf/threads/thread-title.12345/reply-preview
# POST /xf/forums/forum-title.12345/post-thread
# POST /xf/forums/blogs/post-thread
# POST /xf/forums/forum-title.12345/thread-preview
SecRule REQUEST_FILENAME "@rx /(?:conversations/add(?:-preview)?|conversations/messages/\d+/edit|posts/\d+/(?:edit|preview)|(?:conversations|threads)/.*\.\d+/(?:add-reply|reply-preview)|forums/.*\.\d+/(?:post-thread|thread-preview))$" \
SecRule REQUEST_FILENAME "@rx /(?:conversations/add(?:-preview)?|conversations/messages/\d+/edit|posts/\d+/(?:edit|preview)|(?:conversations|threads)/.*\.\d+/(?:add-reply|reply-preview)|forums/.*/(?:post-thread|thread-preview))$" \
"id:9006120,\
phase:2,\
pass,\
Expand Down Expand Up @@ -148,7 +149,8 @@ SecRule REQUEST_FILENAME "@streq /inline-mod/" \

# Warn member
# POST /xf/members/name.12345/warn
SecRule REQUEST_FILENAME "@rx /members/\*\.\d+/warn$" \
# POST /xf/posts/12345/warn
SecRule REQUEST_FILENAME "@rx /(?:members/.*\.\d+|posts/\d+)/warn$" \
"id:9006170,\
phase:2,\
pass,\
Expand Down Expand Up @@ -386,6 +388,7 @@ SecAction \
nolog,\
ctl:ruleRemoveTargetById=931120;ARGS:_xfRedirect,\
ctl:ruleRemoveTargetById=941150;ARGS:_xfRedirect,\
ctl:ruleRemoveTargetById=942230;ARGS:_xfRedirect,\
ctl:ruleRemoveTargetById=931120;ARGS:_xfRequestUri,\
ctl:ruleRemoveTargetById=941150;ARGS:_xfRequestUri,\
ctl:ruleRemoveTargetById=942130;ARGS:_xfRequestUri,\
Expand All @@ -397,6 +400,7 @@ SecAction \
ctl:ruleRemoveTargetById=942150;REQUEST_COOKIES:xf_emoji_usage,\
ctl:ruleRemoveTargetById=942410;REQUEST_COOKIES:xf_emoji_usage,\
ctl:ruleRemoveTargetByTag=OWASP_CRS;REQUEST_COOKIES:xf_ls,\
ctl:ruleRemoveTargetById=942100;REQUEST_COOKIES:xf_session,\
ctl:ruleRemoveTargetById=942100;REQUEST_COOKIES:xf_user"

#
Expand Down Expand Up @@ -504,6 +508,19 @@ SecRule REQUEST_FILENAME "@endsWith /admin.php" \
ctl:ruleRemoveTargetById=942340;ARGS:json,\
ctl:ruleRemoveTargetById=942370;ARGS:json"

# Set forum options
# POST /xf/admin.php?options/update
SecRule REQUEST_FILENAME "@endsWith /admin.php" \
"id:9006960,\
phase:2,\
pass,\
t:none,\
nolog,\
chain"
SecRule REQUEST_URI "@rx /admin\.php\?options/update" \
"t:none,\
ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:options[boardInactiveMessage]"

SecMarker "END-XENFORO-ADMIN"

SecMarker "END-XENFORO"

0 comments on commit 3cf85f6

Please sign in to comment.