]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
http_protocol: Escape request method in 413 error reporting.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 3 Dec 2007 19:45:48 +0000 (19:45 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 3 Dec 2007 19:45:48 +0000 (19:45 +0000)
Determined to be not generally exploitable, but a flaw in any case.

PR: 44014
Submitted by: Victor Stinner <victor.stinner inl.fr>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@600645 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http/http_protocol.c

diff --git a/CHANGES b/CHANGES
index eb91f13b966f6074e2fbe863b293737ec329f8f6..5dbf7957285ffc551d85cf9c9c93dba4fc502ca5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) http_protocol: Escape request method in 413 error reporting.
+     Determined to be not generally exploitable, but a flaw in any case.
+     PR 44014 [Victor Stinner <victor.stinner inl.fr>]
+
   *) rotatelogs: Improve atomicity when using -l and cleaup code.
      PR 44004 [Rainer Jung]
 
index 3d123c9e733cd5dee1ed1d7a9b6b396af591d121..71d1e9d1a63e5ef0f3bc79acea1200a93dce01fc 100644 (file)
@@ -931,7 +931,7 @@ static const char *get_canned_error_string(int status,
     case HTTP_LENGTH_REQUIRED:
         s1 = apr_pstrcat(p,
                          "<p>A request of the requested method ",
-                         r->method,
+                         ap_escape_html(r->pool, r->method),
                          " requires a valid Content-length.<br />\n",
                          NULL);
         return(add_optional_notes(r, s1, "error-notes", "</p>\n"));
@@ -978,7 +978,7 @@ static const char *get_canned_error_string(int status,
                            "The requested resource<br />",
                            ap_escape_html(r->pool, r->uri), "<br />\n",
                            "does not allow request data with ",
-                           r->method,
+                           ap_escape_html(r->pool, r->method),
                            " requests, or the amount of data provided in\n"
                            "the request exceeds the capacity limit.\n",
                            NULL));