Skip to content

Commit 2999826

Browse files
committed
Add captured value to TX in every case if the result is not FALSE
1 parent a0d2684 commit 2999826

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apache2/re_operators.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2309,8 +2309,8 @@ static int msre_op_detectSQLi_execute(modsec_rec *msr, msre_rule *rule, msre_var
23092309

23102310
if (libinjection_evaluate(issqli)) {
23112311
switch(issqli) {
2312+
set_match_to_tx(msr, capture, fingerprint, 0);
23122313
case LIBINJECTION_RESULT_TRUE:
2313-
set_match_to_tx(msr, capture, fingerprint, 0);
23142314
*error_msg = apr_psprintf(msr->mp, "detected SQLi using libinjection with fingerprint '%s'",
23152315
fingerprint);
23162316
break;
@@ -2349,8 +2349,8 @@ static int msre_op_detectXSS_execute(modsec_rec *msr, msre_rule *rule, msre_var
23492349

23502350
if (libinjection_evaluate(is_xss)) {
23512351
switch(is_xss) {
2352+
set_match_to_tx(msr, capture, var->value, 0);
23522353
case LIBINJECTION_RESULT_TRUE:
2353-
set_match_to_tx(msr, capture, var->value, 0);
23542354
*error_msg = apr_psprintf(msr->mp, "detected XSS using libinjection.");
23552355
if (msr->txcfg->debuglog_level >= 9) {
23562356
msr_log(msr, 9, "IS_XSS: libinjection detected XSS.");

0 commit comments

Comments
 (0)