]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r752812 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Sun, 10 May 2009 15:11:46 +0000 (15:11 +0000)
committerRuediger Pluem <rpluem@apache.org>
Sun, 10 May 2009 15:11:46 +0000 (15:11 +0000)
* Escape pathes of filenames in 406 responses to avoid HTML injections and
  HTTP response splitting.

PR: 46837
Submitted by: Geoff Keating <geoffk apple.com>
Reviewed by: rpluem, jim, wrowe

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@773354 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/mappers/mod_negotiation.c

diff --git a/CHANGES b/CHANGES
index b2bbb37ea9c7192adb2c207012228710a82bf981..66edc645d4e5c5c09c60dd885c3b7a273a7b05f2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,10 @@ Changes with Apache 2.2.12
      mod_proxy_ajp: Avoid delivering content from a previous request which
      failed to send a request body. PR 46949 [Ruediger Pluem]
 
+  *) mod_negotiation: Escape pathes of filenames in 406 responses to avoid
+     HTML injections and HTTP response splitting.  PR 46837.
+     [Geoff Keating <geoffk apple.com>]
+
   *) mod_include: Prevent a case of SSI timefmt-smashing with filter chains
      including multiple INCLUDES filters. PR 39369 [Joe Orton]
 
diff --git a/STATUS b/STATUS
index 5a0a19afe5f7471a49c93c1b06276c17c0228f2b..26c76dc5ab8cf0e6a964e00c6c08def9d1d15159 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -87,15 +87,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
- * mod_negotiation: Escape pathes of filenames in 406 responses to avoid
-   HTML injections and HTTP response splitting
-   Trunk version of patch:
-      http://svn.apache.org/viewvc?rev=752812&view=rev
-   Backport version for 2.2.x of patch:
-      Trunk version of patch works
-   +1: rpluem, jim, wrowe
-
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index c9fff1e5e5443c7de6bbfff6ea7bed6a226baffb..a9c6bc9e31f742d4482ee826623127c3cbb36482 100644 (file)
@@ -2530,7 +2530,7 @@ static void set_neg_headers(request_rec *r, negotiation_state *neg,
         /* Generate the string components for this Alternates entry */
 
         *((const char **) apr_array_push(arr)) = "{\"";
-        *((const char **) apr_array_push(arr)) = variant->file_name;
+        *((const char **) apr_array_push(arr)) = ap_escape_path_segment(r->pool, variant->file_name);
         *((const char **) apr_array_push(arr)) = "\" ";
 
         qstr = (char *) apr_palloc(r->pool, 6);
@@ -2804,7 +2804,7 @@ static int setup_choice_response(request_rec *r, negotiation_state *neg,
     }
 
     apr_table_setn(r->err_headers_out, "Content-Location",
-                  apr_pstrdup(r->pool, variant->file_name));
+                  ap_escape_path_segment(r->pool, variant->file_name));
 
     set_neg_headers(r, neg, alg_choice);         /* add Alternates and Vary */