Fixed a bug in transformation caching, which would prevent a match in certian cases.

Updated docs on "pass" action to explicitly state that we execute all targets.
This commit is contained in:
brectanus
2008-03-07 20:23:16 +00:00
parent e0f503a133
commit 024e854725
4 changed files with 25 additions and 8 deletions

View File

@@ -1,5 +1,8 @@
05 Mar 2008 - 2.5.1-breach1 07 Mar 2008 - 2.5.1-rc1
--------------------------- -----------------------
* Fixed an issue where a match would not occur if transformation caching
was enabled.
* Using "severity" in a default action is now just a warning. * Using "severity" in a default action is now just a warning.

View File

@@ -63,7 +63,7 @@ extern DSOLOCAL modsec_build_type_rec modsec_build_type[];
#define MODSEC_VERSION_MAJOR "2" #define MODSEC_VERSION_MAJOR "2"
#define MODSEC_VERSION_MINOR "5" #define MODSEC_VERSION_MINOR "5"
#define MODSEC_VERSION_MAINT "0" #define MODSEC_VERSION_MAINT "0"
#define MODSEC_VERSION_TYPE "-breach" #define MODSEC_VERSION_TYPE "-rc"
#define MODSEC_VERSION_RELEASE "1" #define MODSEC_VERSION_RELEASE "1"
#define MODULE_NAME "ModSecurity for Apache" #define MODULE_NAME "ModSecurity for Apache"

View File

@@ -1988,6 +1988,8 @@ static apr_status_t msre_rule_process_normal(msre_rule *rule, modsec_rec *msr) {
return -1; return -1;
} }
if (rc == RULE_MATCH) { if (rc == RULE_MATCH) {
match_count++;
/* Return straight away if the transaction /* Return straight away if the transaction
* was intercepted - no need to process the remaining * was intercepted - no need to process the remaining
* targets. * targets.

View File

@@ -4,7 +4,7 @@
Manual</title> Manual</title>
<articleinfo> <articleinfo>
<releaseinfo>Version 2.5.1-breach1 (March 05, 2008)</releaseinfo> <releaseinfo>Version 2.5.1-rc1 (March 07, 2008)</releaseinfo>
<copyright> <copyright>
<year>2004-2008</year> <year>2004-2008</year>
@@ -4606,14 +4606,26 @@ SecRule ARGS "attack" <emphasis>multiMatch</emphasis></programlisting>
<para><emphasis>Action Group:</emphasis> Disruptive</para> <para><emphasis>Action Group:</emphasis> Disruptive</para>
<para>Example:</para> <para>Example1:</para>
<programlisting format="linespecific">SecRule REQUEST_HEADERS:User-Agent "Test" log,<emphasis>pass</emphasis></programlisting> <programlisting format="linespecific">SecRule REQUEST_HEADERS:User-Agent "Test" log,<emphasis>pass</emphasis></programlisting>
<para>When using <emphasis>pass</emphasis> with SecRule with multiple
targets, <emphasis>all</emphasis> targets will be processed and
<emphasis>all</emphasis> non-disruptive actions will trigger for
<emphasis>every</emphasis> match found. In the second example the
TX:test target would be incremented by 1 for each matching
argument.</para>
<para>Example2:</para>
<programlisting format="linespecific">SecRule ARGS "test" log,<emphasis>pass</emphasis>,setvar:TX.test=+1</programlisting>
<para><emphasis>Note</emphasis></para> <para><emphasis>Note</emphasis></para>
<para>Transaction will not be interrupted but it will be logged (unless <para>The transaction will not be interrupted but a log will be
logging has been suppressed).</para> generated for each matching target (unless logging has been
suppressed).</para>
</section> </section>
<section> <section>