Skip to content

Commit 379f370

Browse files
victorhoraFelipe Zimmerle
authored and
Felipe Zimmerle
committed
Fix SecResponseBodyAccess and ctl:requestBodyAccess directives
1 parent 5c048e3 commit 379f370

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Diff for: src/transaction.cc

+1-6
Original file line numberDiff line numberDiff line change
@@ -766,14 +766,11 @@ int Transaction::processRequestBody() {
766766
m_variableReqbodyProcessorError.set("0", m_variableOffset);
767767
}
768768

769-
#if 1
770769
if (m_rules->m_secRequestBodyAccess != RulesProperties::TrueConfigBoolean) {
771770
if (m_requestBodyAccess != RulesProperties::TrueConfigBoolean) {
772771
#ifndef NO_LOGS
773772
debug(4, "Request body processing is disabled");
774773
#endif
775-
776-
this->m_rules->evaluate(modsecurity::RequestBodyPhase, this);
777774
return true;
778775
} else {
779776
#ifndef NO_LOGS
@@ -786,14 +783,12 @@ int Transaction::processRequestBody() {
786783
if (m_requestBodyAccess == RulesProperties::FalseConfigBoolean) {
787784
#ifndef NO_LOGS
788785
debug(4, "Request body processing is enabled, but " \
789-
"disable to this transaction due to ctl:requestBodyAccess " \
786+
"disabled to this transaction due to ctl:requestBodyAccess " \
790787
"action");
791788
#endif
792-
this->m_rules->evaluate(modsecurity::RequestBodyPhase, this);
793789
return true;
794790
}
795791
}
796-
#endif
797792

798793
/**
799794
* FIXME: This variable should be calculated on demand, it is

0 commit comments

Comments
 (0)