File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
DD MMM YYYY - 2.9.2 - To be released
2
2
------------------------------------
3
3
4
+ * Avoid additional operator invokation if last transform of a multimatch
5
+ doesn't modify the input
6
+ [Issue #1086, #1087 - Daniel Stelter-Gliese]
4
7
* Adds a sanity check before use ctl:ruleRemoveTargetByTag.
5
8
[Issue #1353 - @LukeP21 and @zimmerle]
6
9
* Uses an optional global lock while manipulating collections.
Original file line number Diff line number Diff line change @@ -2872,7 +2872,10 @@ static apr_status_t msre_rule_process_normal(msre_rule *rule, modsec_rec *msr) {
2872
2872
arr = apr_table_elts (tartab );
2873
2873
te = (apr_table_entry_t * )arr -> elts ;
2874
2874
for (i = 0 ; i < arr -> nelts ; i ++ ) {
2875
+ /* Variable was modified by *any* transformation */
2875
2876
int changed ;
2877
+ /* Variable was modified by *last applied* transformation (needed by multimatch) */
2878
+ int tfnchanged ;
2876
2879
int usecache = 0 ;
2877
2880
apr_table_t * cachetab = NULL ;
2878
2881
apr_time_t time_before_trans = 0 ;
@@ -2995,8 +2998,8 @@ static apr_status_t msre_rule_process_normal(msre_rule *rule, modsec_rec *msr) {
2995
2998
apr_table_t * normtab ;
2996
2999
const char * lastvarval = NULL ;
2997
3000
apr_size_t lastvarlen = 0 ;
2998
- int tfnchanged = 0 ;
2999
3001
3002
+ tfnchanged = 0 ;
3000
3003
changed = 0 ;
3001
3004
normtab = apr_table_make (mptmp , 10 );
3002
3005
if (normtab == NULL ) return -1 ;
@@ -3278,7 +3281,7 @@ static apr_status_t msre_rule_process_normal(msre_rule *rule, modsec_rec *msr) {
3278
3281
* or if it is and we need to process the result of the
3279
3282
* last transformation.
3280
3283
*/
3281
- if (!multi_match || changed ) {
3284
+ if (!multi_match || tfnchanged ) {
3282
3285
invocations ++ ;
3283
3286
3284
3287
#if defined(PERFORMANCE_MEASUREMENT )
You can’t perform that action at this time.
0 commit comments