From c8185c253b6d4d0b3340e32072db54463231af7e Mon Sep 17 00:00:00 2001 From: André Malo Date: Thu, 6 Mar 2003 23:53:52 +0000 Subject: Minor MMN bump: Forward port: Escape special characters (especially control characters) in mod_log_config to make a clear distinction between client-supplied strings (with special characters) and server-side strings. This was already introduced in version 1.3.25. Obtained from: Patch in 1.3.25-dev by Martin git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98912 13f79535-47bb-0310-9956-ffa450edef68 --- include/ap_mmn.h | 6 ++++-- include/httpd.h | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 84744b8035..9e029cfc30 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -112,7 +112,9 @@ * 20020628 (2.0.40-dev) Added filter_init to filter registration functions * 20020903 (2.0.41-dev) APR's error constants changed * 20020903.1 (2.1.0-dev) allow_encoded_slashes added to core_dir_config - * 20030213.1 (2.1.0-dev) changed log_writer optional fn's to return previous handler + * 20030213.1 (2.1.0-dev) changed log_writer optional fn's to return previous + * handler + * 20030213.2 (2.1.0-dev) add ap_escape_logitem */ #define MODULE_MAGIC_COOKIE 0x41503230UL /* "AP20" */ @@ -120,7 +122,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20030213 #endif -#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 2 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/httpd.h b/include/httpd.h index b922506ca4..cfbbab6c13 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -1359,6 +1359,14 @@ AP_DECLARE(char *) ap_os_escape_path(apr_pool_t *p, const char *path, int partia */ AP_DECLARE(char *) ap_escape_html(apr_pool_t *p, const char *s); +/** + * Escape a string for logging + * @param p The pool to allocate from + * @param s The string to escape + * @return The escaped string + */ +AP_DECLARE(char *) ap_escape_logitem(apr_pool_t *p, const char *str); + /** * Construct a full hostname * @param p The pool to allocate from -- cgit v1.2.3