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

Commit f844b85

Browse files
authored
Merge branch 'v3.1/devFileUpload' into v3.2/dev
2 parents 26f0be9 + ec699bf commit f844b85

File tree

4 files changed

+582
-2
lines changed

4 files changed

+582
-2
lines changed

crs-setup.conf.example

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,16 @@ SecDefaultAction "phase:2,log,auditlog,pass"
425425
# t:none,\
426426
# setvar:'tx.static_extensions=/.jpg/ /.jpeg/ /.png/ /.gif/ /.js/ /.css/ /.ico/ /.svg/ /.webp/'"
427427

428+
# Locations that will be inspected to enforce only images and documents uploads.
429+
# Default: /wp-admin/upload.php /wp-admin/media-new.php
430+
# Uncomment this rule to change the default set in 901180
431+
#SecAction \
432+
# "id:900270,\
433+
# phase:1,\
434+
# nolog,\
435+
# pass,\
436+
# t:none,\
437+
# setvar:'tx.protected_uploads=#/wp-admin/upload.php# #/wp-admin/media-new.php#'"
428438

429439
#
430440
# -- [[ HTTP Argument/Upload Limits ]] -----------------------------------------
@@ -802,4 +812,4 @@ SecAction \
802812
nolog,\
803813
pass,\
804814
t:none,\
805-
setvar:tx.crs_setup_version=302"
815+
setvar:tx.crs_setup_version=310"

rules/REQUEST-901-INITIALIZATION.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ SecRule &TX:enforce_bodyproc_urlencoded "@eq 0" \
202202
nolog,\
203203
setvar:'tx.enforce_bodyproc_urlencoded=0'"
204204

205-
SecAction \
205+
# If a default protected_uploads variable is not set in crs-setup rule 900270
206+
# then a generic default will be set here.
207+
SecRule &TX:protected_uploads "@eq 0" \
206208
"id:901180,\
207209
phase:1,\
208210
pass,\

0 commit comments

Comments
 (0)