From: André Malo Date: Sun, 6 Apr 2003 21:34:03 +0000 (+0000) Subject: document log escaping X-Git-Tag: pre_ajp_proxy~1888 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5123950bf65f1e4067937351f5a120fa10b5c88;p=apache document log escaping Reviewed by: Astrid Ke�ler, Erik Abele git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99283 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_log_config.html.en b/docs/manual/mod/mod_log_config.html.en index fb33e89753..7c542da77e 100644 --- a/docs/manual/mod/mod_log_config.html.en +++ b/docs/manual/mod/mod_log_config.html.en @@ -178,11 +178,20 @@ "%!200,304,302{Referer}i" logs Referer: on all requests which did not return some sort of normal status.

-

Note that there is no escaping performed on the strings from - %...r, %...i and %...o. This - is mainly to comply with the requirements of the Common Log Format. - This implies that clients can insert control characters into the log, - so care should be taken when dealing with raw log files.

+

Note that in versions previous to 2.0.46 no escaping has been performed + on the strings from %...r, %...i and + %...o. This was mainly to comply with the requirements of + the Common Log Format. This implied that clients could insert control + characters into the log, so you had to be quite careful when dealing + with raw log files.

+ +

For security reasons starting with 2.0.46 non-printable and + other special characters are escaped mostly by using + \xhh sequences, where hh stands for + the hexadecimal representation of the raw byte. Exceptions from this + rule are " and \ which are escaped by prepending + a backslash, and all whitespace characters that are written in their + C-notation (\n, \t etc).

Some commonly used log format strings are:

diff --git a/docs/manual/mod/mod_log_config.xml b/docs/manual/mod/mod_log_config.xml index f8e4c8175c..3eb3cee991 100644 --- a/docs/manual/mod/mod_log_config.xml +++ b/docs/manual/mod/mod_log_config.xml @@ -185,11 +185,20 @@ "%!200,304,302{Referer}i" logs Referer: on all requests which did not return some sort of normal status.

-

Note that there is no escaping performed on the strings from - %...r, %...i and %...o. This - is mainly to comply with the requirements of the Common Log Format. - This implies that clients can insert control characters into the log, - so care should be taken when dealing with raw log files.

+

Note that in versions previous to 2.0.46 no escaping has been performed + on the strings from %...r, %...i and + %...o. This was mainly to comply with the requirements of + the Common Log Format. This implied that clients could insert control + characters into the log, so you had to be quite careful when dealing + with raw log files.

+ +

For security reasons starting with 2.0.46 non-printable and + other special characters are escaped mostly by using + \xhh sequences, where hh stands for + the hexadecimal representation of the raw byte. Exceptions from this + rule are " and \ which are escaped by prepending + a backslash, and all whitespace characters that are written in their + C-notation (\n, \t etc).

Some commonly used log format strings are: