diff --git a/plugins/sogo-rule-exclusions-before.conf b/plugins/sogo-rule-exclusions-before.conf index 9cc8a14..93b6279 100644 --- a/plugins/sogo-rule-exclusions-before.conf +++ b/plugins/sogo-rule-exclusions-before.conf @@ -60,6 +60,7 @@ SecRule REQUEST_FILENAME "@streq /SOGo/connect" \ pass,\ t:none,\ nolog,\ + ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:password,\ ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:json.password,\ ver:'sogo-rule-exclusions-plugin/1.0.0'" @@ -91,10 +92,14 @@ SecRule REQUEST_FILENAME "@rx ^/SOGo/so/[^/]+/Mail/[0-9]/folderDrafts/newDraft[0 pass,\ t:none,\ nolog,\ + ctl:ruleRemoveTargetById=942131;ARGS:from,\ ctl:ruleRemoveTargetById=942131;ARGS:json.from,\ ctl:ruleRemoveTargetById=942131;ARGS:json.to.array_0,\ + ctl:ruleRemoveTargetById=942131;ARGS:to.array_0,\ ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:json.subject,\ ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:json.text,\ + ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:subject,\ + ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:text,\ ver:'sogo-rule-exclusions-plugin/1.0.0'" # @@ -110,6 +115,8 @@ SecRule REQUEST_FILENAME "@streq /SOGo/so/changePassword" \ nolog,\ ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:json.oldPassword,\ ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:json.newPassword,\ + ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:oldPassword,\ + ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:newPassword,\ ver:'sogo-rule-exclusions-plugin/1.0.0'" # When changing settings in SOGo @@ -120,6 +127,9 @@ SecRule REQUEST_FILENAME "@rx ^/SOGo/so/[^/]+/Preferences/save$" \ t:none,\ nolog,\ ctl:ruleRemoveTargetById=920272;REQUEST_BODY,\ + ctl:ruleRemoveTargetById=920272;ARGS:defaults.SOGoTimeFormat,\ + ctl:ruleRemoveTargetById=920272;ARGS:defaults.SOGoLongDateFormat,\ + ctl:ruleRemoveTargetById=920272;ARGS:defaults.SOGoShortDateFormat,\ ctl:ruleRemoveTargetById=920272;ARGS:json.defaults.SOGoTimeFormat,\ ctl:ruleRemoveTargetById=920272;ARGS:json.defaults.SOGoLongDateFormat,\ ctl:ruleRemoveTargetById=920272;ARGS:json.defaults.SOGoShortDateFormat,\ @@ -147,15 +157,18 @@ SecRule REQUEST_FILENAME "@rx ^/SOGo/so/[^/]+/Contacts/[^/]+/[^/]+\.vcf/saveAsCo ctl:ruleRemoveTargetById=931130;ARGS:json.urls.array_5.value,\ ctl:ruleRemoveTargetById=931130;ARGS:json.urls.array_6.value,\ ctl:ruleRemoveTargetById=931130;ARGS:json.urls.array_7.value,\ + ctl:ruleRemoveTargetById=931130;ARGS:urls.urls.value,\ ver:'sogo-rule-exclusions-plugin/1.0.0'" # When modifying properties for Addressbook +# Enabling/disabling Microsoft ActiveSync SecRule REQUEST_FILENAME "@rx ^/SOGo/so/[^/]+/Contacts/[^/]+/save$" \ "id:9520121,\ phase:1,\ pass,\ t:none,\ nolog,\ + ctl:ruleRemoveTargetById=931130;ARGS:cardDavURL,\ ctl:ruleRemoveTargetById=931130;ARGS:json.cardDavURL,\ ver:'sogo-rule-exclusions-plugin/1.0.0'" @@ -171,6 +184,7 @@ SecRule REQUEST_FILENAME "@rx ^/SOGo/so/[^/]+/Calendar/[^/]+/[^/]+\.ics/(?:saveA pass,\ t:none,\ nolog,\ + ctl:ruleRemoveTargetById=931130;ARGS:attachUrls.attachUrls.value,\ ctl:ruleRemoveTargetById=931130;ARGS:json.attachUrls.array_0.value,\ ctl:ruleRemoveTargetById=931130;ARGS:json.attachUrls.array_1.value,\ ctl:ruleRemoveTargetById=931130;ARGS:json.attachUrls.array_2.value,\ @@ -189,6 +203,7 @@ SecRule REQUEST_FILENAME "@rx ^/SOGo/so/[^/]+/Calendar/[^/]+/[^/]+\.ics/(?:saveA pass,\ t:none,\ nolog,\ + ctl:ruleRemoveTargetById=931130;ARGS:attachUrls.attachUrls.value,\ ctl:ruleRemoveTargetById=931130;ARGS:json.attachUrls.array_0.value,\ ctl:ruleRemoveTargetById=931130;ARGS:json.attachUrls.array_1.value,\ ctl:ruleRemoveTargetById=931130;ARGS:json.attachUrls.array_2.value,\ @@ -213,6 +228,11 @@ SecRule REQUEST_FILENAME "@rx ^/SOGo/so/[^/]+/Calendar/[^/]+/save$" \ ctl:ruleRemoveTargetById=931130;ARGS:json.urls.webDavURL,\ ctl:ruleRemoveTargetById=931130;ARGS:json.urls.calDavURL,\ ctl:ruleRemoveTargetById=931130;ARGS:json.urls.webCalendarURL,\ + ctl:ruleRemoveTargetById=931130;ARGS:urls.webDavICSURL,\ + ctl:ruleRemoveTargetById=931130;ARGS:urls.webDavXMLURL,\ + ctl:ruleRemoveTargetById=931130;ARGS:urls.webDavURL,\ + ctl:ruleRemoveTargetById=931130;ARGS:urls.calDavURL,\ + ctl:ruleRemoveTargetById=931130;ARGS:urls.webCalendarURL,\ ver:'sogo-rule-exclusions-plugin/1.0.0'" # When adding a remote web calendar @@ -223,6 +243,7 @@ SecRule REQUEST_FILENAME "@rx ^/SOGo/so/[^/]+/Calendar/addWebCalendar$" \ t:none,\ nolog,\ ctl:ruleRemoveTargetById=931130;ARGS:json.url,\ + ctl:ruleRemoveTargetById=931130;ARGS:url,\ ver:'sogo-rule-exclusions-plugin/1.0.0'" # diff --git a/tests/regression/sogo-rule-exclusions-plugin/9520101.yaml b/tests/regression/sogo-rule-exclusions-plugin/9520101.yaml index 266eabd..f0d1af7 100644 --- a/tests/regression/sogo-rule-exclusions-plugin/9520101.yaml +++ b/tests/regression/sogo-rule-exclusions-plugin/9520101.yaml @@ -15,8 +15,11 @@ tests: Host: localhost User-Agent: SOGo rule exclusions plugin Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 + Content-Type: application/json;charset=UTF-8 port: 80 method: POST - uri: /SOGo/connect?json.password=