You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2015/08/12 19:35:48 UTC
svn commit: r1695583 - in /httpd/httpd/trunk: CHANGES
modules/mappers/mod_dir.c
Author: covener
Date: Wed Aug 12 17:35:47 2015
New Revision: 1695583
URL: http://svn.apache.org/r1695583
Log:
+ *) mod_dir: Prevent the internal identifier "httpd/unix-directory" from
+ appearing as a Content-Type response header when requests for a directory
+ are rewritten by mod_rewrite. [Eric Covener]
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/mappers/mod_dir.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1695583&r1=1695582&r2=1695583&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Aug 12 17:35:47 2015
@@ -1,6 +1,10 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_dir: Prevent the internal identifier "httpd/unix-directory" from
+ appearing as a Content-Type response header when requests for a directory
+ are rewritten by mod_rewrite. [Eric Covener]
+
*) mod_rewrite: Allow cookies set by mod_rewrite to contain ':' by accepting
';' as an alternate separator. PR47241.
[<bugzilla schermesser com>, Eric Covener]
Modified: httpd/httpd/trunk/modules/mappers/mod_dir.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_dir.c?rev=1695583&r1=1695582&r2=1695583&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_dir.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_dir.c Wed Aug 12 17:35:47 2015
@@ -279,11 +279,19 @@ static int fixup_dir(request_rec *r)
}
if (d->checkhandler == MODDIR_ON && strcmp(r->handler, DIR_MAGIC_TYPE)) {
+ /* Prevent DIR_MAGIC_TYPE from leaking out when someone has taken over */
+ if (!strcmp(r->content_type, DIR_MAGIC_TYPE)) {
+ r->content_type = NULL;
+ }
return DECLINED;
}
/* we're running between mod_rewrites fixup and its internal redirect handler, step aside */
if (!strcmp(r->handler, REWRITE_REDIRECT_HANDLER_NAME)) {
+ /* Prevent DIR_MAGIC_TYPE from leaking out when someone has taken over */
+ if (!strcmp(r->content_type, DIR_MAGIC_TYPE)) {
+ r->content_type = NULL;
+ }
return DECLINED;
}