mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Added extra debug msg for log section K
This commit is contained in:
@@ -461,12 +461,26 @@ msre_rule *return_chained_rule(const msre_rule *current, modsec_rec *msr) {
|
|||||||
rule = rules[i];
|
rule = rules[i];
|
||||||
if (rule != NULL) {
|
if (rule != NULL) {
|
||||||
if (strncmp(current->unparsed,rule->unparsed,strlen(current->unparsed)) == 0) {
|
if (strncmp(current->unparsed,rule->unparsed,strlen(current->unparsed)) == 0) {
|
||||||
|
|
||||||
if (i < arr->nelts -1) {
|
if (i < arr->nelts -1) {
|
||||||
next_rule = rules[i+1];
|
next_rule = rules[i+1];
|
||||||
} else {
|
} else {
|
||||||
next_rule = rules[i];
|
next_rule = rules[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (next_rule == NULL || next_rule->chain_starter == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if(current->chain_starter == NULL && next_rule->chain_starter != NULL) {
|
||||||
|
if (strncmp(current->unparsed, next_rule->chain_starter->unparsed, strlen(current->unparsed)) != 0)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(current->chain_starter != NULL && next_rule->chain_starter != NULL) {
|
||||||
|
if (strncmp(current->chain_starter->unparsed, rule->chain_starter->unparsed, strlen(current->chain_starter->unparsed)) != 0)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (msr->txcfg->debuglog_level >= 9) {
|
if (msr->txcfg->debuglog_level >= 9) {
|
||||||
msr_log(msr, 9, "Logging [K]: Found chained rule: \"%s\" and next node: \"%s\".", log_escape(msr->mp, current->unparsed), next_rule == NULL ? "-" : log_escape(msr->mp, next_rule->unparsed));
|
msr_log(msr, 9, "Logging [K]: Found chained rule: \"%s\" and next node: \"%s\".", log_escape(msr->mp, current->unparsed), next_rule == NULL ? "-" : log_escape(msr->mp, next_rule->unparsed));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user