aboutsummaryrefslogtreecommitdiffstats
path: root/www/apache20
diff options
context:
space:
mode:
authorclement <clement@FreeBSD.org>2005-12-13 04:35:19 +0800
committerclement <clement@FreeBSD.org>2005-12-13 04:35:19 +0800
commit73b86729a10be86be7001d0e1cfe777d3bb72cc2 (patch)
tree6abdc17a24090b548f77d6663e264a69694da067 /www/apache20
parentd73dde31fa2cdb62e87f6e83ca92d1de98a1cf5d (diff)
downloadfreebsd-ports-graphics-73b86729a10be86be7001d0e1cfe777d3bb72cc2.tar.gz
freebsd-ports-graphics-73b86729a10be86be7001d0e1cfe777d3bb72cc2.tar.zst
freebsd-ports-graphics-73b86729a10be86be7001d0e1cfe777d3bb72cc2.zip
SECURITY: CVE-2005-3352 (cve.mitre.org)
mod_imap: Escape untrusted referer header before outputting in HTML to avoid potential cross-site scripting. Change also made to ap_escape_html so we escape quotes. Reported by JPCERT. [Mark Cox] Reported by: simon
Diffstat (limited to 'www/apache20')
-rw-r--r--www/apache20/Makefile2
-rw-r--r--www/apache20/files/patch-secfix-CAN-2005-335235
2 files changed, 36 insertions, 1 deletions
diff --git a/www/apache20/Makefile b/www/apache20/Makefile
index b5dc19e2b83..5cd3bb12746 100644
--- a/www/apache20/Makefile
+++ b/www/apache20/Makefile
@@ -9,7 +9,7 @@
PORTNAME= apache
PORTVERSION= 2.0.55
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} \
${MASTER_SITE_LOCAL:S/$/:powerlogo/}
diff --git a/www/apache20/files/patch-secfix-CAN-2005-3352 b/www/apache20/files/patch-secfix-CAN-2005-3352
new file mode 100644
index 00000000000..895e30345d6
--- /dev/null
+++ b/www/apache20/files/patch-secfix-CAN-2005-3352
@@ -0,0 +1,35 @@
+--- modules/mappers/mod_imap.c (original)
++++ modules/mappers/mod_imap.c Mon Dec 12 08:41:53 2005
+@@ -342,7 +342,7 @@
+ if (!strcasecmp(value, "referer")) {
+ referer = apr_table_get(r->headers_in, "Referer");
+ if (referer && *referer) {
+- return apr_pstrdup(r->pool, referer);
++ return ap_escape_html(r->pool, referer);
+ }
+ else {
+ /* XXX: This used to do *value = '\0'; ... which is totally bogus
+
+--- server/util.c (original)
++++ server/util.c Mon Dec 12 08:41:53 2005
+@@ -1762,6 +1762,8 @@
+ j += 3;
+ else if (s[i] == '&')
+ j += 4;
++ else if (s[i] == '"')
++ j += 5;
+
+ if (j == 0)
+ return apr_pstrmemdup(p, s, i);
+@@ -1779,6 +1781,10 @@
+ else if (s[i] == '&') {
+ memcpy(&x[j], "&amp;", 5);
+ j += 4;
++ }
++ else if (s[i] == '"') {
++ memcpy(&x[j], "&quot;", 6);
++ j += 5;
+ }
+ else
+ x[j] = s[i];
+