fix: add ARGS to sanitize list only if it's not added yet

This commit is contained in:
Ervin Hegedus
2025-05-19 10:53:50 +02:00
parent 7d738112d3
commit fdfc2d5b21
4 changed files with 5 additions and 1 deletions

View File

@@ -1527,8 +1527,9 @@ static apr_status_t msre_action_sanitizeMatched_execute(modsec_rec *msr, apr_poo
for (i = 0; i < tarr->nelts; i++) {
msc_arg *arg = (msc_arg *)telts[i].val;
assert(arg != NULL);
if (strcasecmp(sargname, arg->name) == 0) {
if (arg->marked_for_sanitization == 0 && strcasecmp(sargname, arg->name) == 0) {
apr_table_addn(msr->arguments_to_sanitize, arg->name, (void *)arg);
arg->marked_for_sanitization = 1;
}
}
break;