httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r603619 - in /httpd/httpd/branches/2.0.x: CHANGES modules/mappers/mod_imap.c
Date Wed, 12 Dec 2007 14:11:31 GMT
Author: jorton
Date: Wed Dec 12 06:11:30 2007
New Revision: 603619

URL: http://svn.apache.org/viewvc?rev=603619&view=rev
Log:
Merge r603282 from trunk:

Fix CVE-2007-5000:

* modules/mappers/mod_imap.c (menu_header): Fix cross-site-scripting
  issue by escaping the URI, and ensure that a charset parameter is 
  sent in the content-type to prevent autodetection by broken browsers.

Reported by: JPCERT
Reviewed by: jorton, rpluem, trawick

Modified:
    httpd/httpd/branches/2.0.x/CHANGES
    httpd/httpd/branches/2.0.x/modules/mappers/mod_imap.c

Modified: httpd/httpd/branches/2.0.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/CHANGES?rev=603619&r1=603618&r2=603619&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.0.x/CHANGES [utf-8] Wed Dec 12 06:11:30 2007
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.0.62
 
+  *) SECURITY: CVE-2007-5000 (cve.mitre.org)
+     mod_imagemap: Fix a cross-site scripting issue.  Reported by JPCERT.
+     [Joe Orton]  
 
 Changes with Apache 2.0.61
 

Modified: httpd/httpd/branches/2.0.x/modules/mappers/mod_imap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/modules/mappers/mod_imap.c?rev=603619&r1=603618&r2=603619&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/modules/mappers/mod_imap.c (original)
+++ httpd/httpd/branches/2.0.x/modules/mappers/mod_imap.c Wed Dec 12 06:11:30 2007
@@ -479,13 +479,16 @@
 
 static void menu_header(request_rec *r, char *menu)
 {
-    ap_set_content_type(r, "text/html");
+    ap_set_content_type(r, "text/html; charset=ISO-8859-1");
 
-    ap_rvputs(r, DOCTYPE_HTML_3_2, "<html><head>\n<title>Menu for ", r->uri,
-           "</title>\n</head><body>\n", NULL);
+    ap_rvputs(r, DOCTYPE_HTML_3_2, "<html><head>\n<title>Menu for ", 
+              ap_escape_html(r->pool, r->uri),
+              "</title>\n</head><body>\n", NULL);
 
     if (!strcasecmp(menu, "formatted")) {
-        ap_rvputs(r, "<h1>Menu for ", r->uri, "</h1>\n<hr />\n\n", NULL);
+        ap_rvputs(r, "<h1>Menu for ", 
+                  ap_escape_html(r->pool, r->uri),
+                  "</h1>\n<hr />\n\n", NULL);
     }
 
     return;



Mime
View raw message