*) mod_dav: Return a WWW-auth header for MOVE/COPY requests where
the destination resource gives a 401. PR 15571. [Joe Orton]
- *) SECURITY [CAN-2003-0020]: Escape arbitrary data before writing
- into the errorlog. [André Malo]
+ *) SECURITY: CAN-2003-0020 (cve.mitre.org)
+ Escape arbitrary data before writing into the errorlog. Unescaped
+ errorlogs are still possible using the compile time switch
+ "-DAP_UNSAFE_ERROR_LOG_UNESCAPED". [Geoffrey Young, André Malo]
*) mod_autoindex / core: Don't fail to show filenames containing
special characters like '%'. PR 13598. [André Malo]
APACHE 2.0 STATUS: -*-text-*-
-Last modified at [$Date: 2004/01/21 15:00:50 $]
+Last modified at [$Date: 2004/01/23 00:04:40 $]
Release:
but actually resolving the host would not. To catch the check
via retcode, you have to specify the NI_NAMEREQD flag.
- * unescaped error logs seem to be essential for some folks
- backport -DAP_UNSAFE_ERROR_LOG_UNESCAPED to 2.0 and 1.3
- server/log.c: r1.139, r1.140
- +1: nd, stas, geoff
-
PATCHES TO BACKPORT FROM 2.1
[ please place file names and revisions from HEAD here, so it is easy to
identify exactly what the proposed changes are! ]
const request_rec *r, apr_pool_t *pool,
const char *fmt, va_list args)
{
- char errstr[MAX_STRING_LEN], scratch[MAX_STRING_LEN];
+ char errstr[MAX_STRING_LEN];
+#ifndef AP_UNSAFE_ERROR_LOG_UNESCAPED
+ char scratch[MAX_STRING_LEN];
+#endif
apr_size_t len, errstrlen;
apr_file_t *logf = NULL;
const char *referer;
}
errstrlen = len;
+#ifndef AP_UNSAFE_ERROR_LOG_UNESCAPED
if (apr_vsnprintf(scratch, MAX_STRING_LEN - len, fmt, args)) {
len += ap_escape_errorlog_item(errstr + len, scratch,
MAX_STRING_LEN - len);
}
+#else
+ len += apr_vsnprintf(errstr + len, MAX_STRING_LEN - len, fmt, args);
+#endif
if ( r && (referer = apr_table_get(r->headers_in, "Referer"))
- && ap_escape_errorlog_item(scratch, referer, MAX_STRING_LEN - len)) {
+#ifndef AP_UNSAFE_ERROR_LOG_UNESCAPED
+ && ap_escape_errorlog_item(scratch, referer, MAX_STRING_LEN - len)
+#endif
+ ) {
len += apr_snprintf(errstr + len, MAX_STRING_LEN - len,
- ", referer: %s", scratch);
+ ", referer: %s",
+#ifndef AP_UNSAFE_ERROR_LOG_UNESCAPED
+ scratch
+#else
+ referer
+#endif
+ );
}
/* NULL if we are logging to syslog */