Added TX:LAST_MATCHED_VAR_NAME. See #123.

This commit is contained in:
brectanus
2007-10-01 22:35:52 +00:00
parent e0e031d163
commit da1399f0b8
4 changed files with 49 additions and 5 deletions

View File

@@ -3,7 +3,7 @@
<title>ModSecurity Reference Manual</title>
<articleinfo>
<releaseinfo>Version 2.5.0-dev3 / (September 28, 2007)</releaseinfo>
<releaseinfo>Version 2.5.0-dev3 / (October 1, 2007)</releaseinfo>
<copyright>
<year>2004-2007</year>
@@ -2977,6 +2977,30 @@ SecAction setsid:%{REQUEST_COOKIES.PHPSESSID}</programlisting>
this this request and then it will decided whether or not to allow/deny
the request through.</para>
<para>The following is a list of reserved names in the TX
collection:</para>
<itemizedlist>
<listitem>
<para><literal moreinfo="none">TX:0</literal> - The matching value
when using the <literal moreinfo="none">@rx</literal> or <literal
moreinfo="none">@pm</literal> operator with the <literal
moreinfo="none">capture</literal> action.</para>
</listitem>
<listitem>
<para><literal moreinfo="none">TX:1-TX:9</literal> - The captured
subexpression value when using the <literal
moreinfo="none">@rx</literal> operator with capturing parens and the
<literal moreinfo="none">capture</literal> action.</para>
</listitem>
<listitem>
<para><literal moreinfo="none">TX:LAST_MATCHED_VAR_NAME</literal> -
The full name of the variable that was matched against.</para>
</listitem>
</itemizedlist>
<programlisting format="linespecific">SecRule WEBSERVER_ERROR_LOG "does not exist" "phase:5,pass,<emphasis
role="bold">setvar:tx.score=+5</emphasis>"
SecRule<emphasis role="bold"> TX:SCORE</emphasis> "@gt 20" deny,log</programlisting>
@@ -5028,4 +5052,4 @@ SecRule REQUEST_METHOD "!<emphasis role="bold">@within %{tx.allowed_methods}</em
</section>
</section>
</section>
</article>
</article>