Reverted r950 which moved the periods from the message to after the "[offset ...]" tag. This tag was intended to be interpreted as metadata.

Enhanced the documentation from r951 to reflect "[offset ...]" as metadata and not the message.
This commit is contained in:
brectanus 2008-02-15 23:05:30 +00:00
parent 1fbf0c97f2
commit aef091a849
2 changed files with 21 additions and 17 deletions

View File

@ -1134,7 +1134,7 @@ static int msre_op_verifyCC_execute(modsec_rec *msr, msre_rule *rule, msre_var *
/* Match. */
/* This message will be logged. */
*error_msg = apr_psprintf(msr->mp, "CC# match \"%s\" at %s [offset \"%d\"].",
*error_msg = apr_psprintf(msr->mp, "CC# match \"%s\" at %s. [offset \"%d\"]",
regex->pattern, var->name, offset);
return 1;
@ -1669,30 +1669,30 @@ static int msre_op_validateUtf8Encoding_execute(modsec_rec *msr, msre_rule *rule
case UNICODE_ERROR_CHARACTERS_MISSING :
*error_msg = apr_psprintf(msr->mp, "Invalid UTF-8 encoding: "
"not enough bytes in character "
"at %s [offset \"%d\"].", var->name, i);
"at %s. [offset \"%d\"]", var->name, i);
return 1;
break;
case UNICODE_ERROR_INVALID_ENCODING :
*error_msg = apr_psprintf(msr->mp, "Invalid UTF-8 encoding: "
"invalid byte value in character "
"at %s [offset \"%d\"].", var->name, i);
"at %s. [offset \"%d\"]", var->name, i);
return 1;
break;
case UNICODE_ERROR_OVERLONG_CHARACTER :
*error_msg = apr_psprintf(msr->mp, "Invalid UTF-8 encoding: "
"overlong character detected "
"at %s [offset \"%d\"].", var->name, i);
"at %s. [offset \"%d\"]", var->name, i);
return 1;
break;
case UNICODE_ERROR_RESTRICTED_CHARACTER :
*error_msg = apr_psprintf(msr->mp, "Invalid UTF-8 encoding: "
"use of restricted character "
"at %s [offset \"%d\"].", var->name, i);
"at %s. [offset \"%d\"]", var->name, i);
return 1;
break;
case UNICODE_ERROR_DECODING_ERROR :
*error_msg = apr_psprintf(msr->mp, "Invalid UTF-8 encoding: decoding error "
"at %s [offset \"%d\"].", var->name, i);
*error_msg = apr_psprintf(msr->mp, "Error validating UTF-8 decoding "
"at %s. [offset \"%d\"]", var->name, i);
return 1;
break;
}

View File

@ -5599,33 +5599,32 @@ against "REQUEST_PROTOCOL" required.</programlisting>
<itemizedlist>
<listitem>
<para>Invalid UTF-8 encoding: not enough bytes in character at
%0 [offset %1].</para>
%0.</para>
</listitem>
<listitem>
<para>Invalid UTF-8 encoding: invalid byte value in character at
%0 [offset %1].</para>
%0.</para>
</listitem>
<listitem>
<para>Invalid UTF-8 encoding: overlong character detected at %0
[offset %1].</para>
<para>Invalid UTF-8 encoding: overlong character detected at
%0.</para>
</listitem>
<listitem>
<para>Invalid UTF-8 encoding: use of restricted character at %0
[offset %1].</para>
<para>Invalid UTF-8 encoding: use of restricted character at
%0.</para>
</listitem>
<listitem>
<para>Invalid UTF-8 encoding: decoding error at %0 [offset
%1].</para>
<para>Invalid UTF-8 encoding: decoding error at %0.</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>@verifyCC - CC# match %0 at %1 [offset %2].</para>
<para>@verifyCC - CC# match %0 at %1.</para>
</listitem>
</itemizedlist>
@ -5654,6 +5653,11 @@ against "REQUEST_PROTOCOL" required.</programlisting>
<para>The following metadata fields are currently used:</para>
<orderedlist>
<listitem>
<para><literal>offset</literal> - The byte offset where a match
occured within the target data. This is not always available.</para>
</listitem>
<listitem>
<para><literal>id</literal> - Unique rule ID, as specified by the
<literal>id</literal> action.</para>
@ -5912,4 +5916,4 @@ Server: Apache/2.x.x
</section>
</section>
</section>
</article>
</article>