Skip to content

Commit 3a54cce

Browse files
authored
Merge commit from fork
fix: avoid multiplication of storing argument keys for sanitizing
2 parents a217cb1 + 614c6e1 commit 3a54cce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apache2/re_actions.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,8 +1455,9 @@ static apr_status_t msre_action_sanitizeArg_execute(modsec_rec *msr, apr_pool_t
14551455
for (i = 0; i < tarr->nelts; i++) {
14561456
msc_arg *arg = (msc_arg *)telts[i].val;
14571457

1458-
if (strcasecmp(sargname, arg->name) == 0) {
1458+
if (arg->marked_for_sanitization == 0 && strcasecmp(sargname, arg->name) == 0) {
14591459
apr_table_addn(msr->arguments_to_sanitize, arg->name, (void *)arg);
1460+
arg->marked_for_sanitization = 1;
14601461
}
14611462
}
14621463

0 commit comments

Comments
 (0)