aboutsummaryrefslogtreecommitdiff
path: root/www/apache13-ssl
diff options
context:
space:
mode:
authorClement Laforet <clement@FreeBSD.org>2005-12-12 20:31:53 +0000
committerClement Laforet <clement@FreeBSD.org>2005-12-12 20:31:53 +0000
commitf22b2cf2324f0ca3496cd8f3bbd1580cbe95061d (patch)
treeb3ed05d5928504af6b3aa69bee2f69c47a72a170 /www/apache13-ssl
parentd2053e182e39c0a3d488ed6c04da8432164f3b61 (diff)
downloadports-f22b2cf2324f0ca3496cd8f3bbd1580cbe95061d.tar.gz
ports-f22b2cf2324f0ca3496cd8f3bbd1580cbe95061d.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
Notes
Notes: svn path=/head/; revision=151041
Diffstat (limited to 'www/apache13-ssl')
-rw-r--r--www/apache13-ssl/Makefile2
-rw-r--r--www/apache13-ssl/files/patch-secfix-CAN-2005-335235
2 files changed, 36 insertions, 1 deletions
diff --git a/www/apache13-ssl/Makefile b/www/apache13-ssl/Makefile
index fdadde323da2..a8a03f04545c 100644
--- a/www/apache13-ssl/Makefile
+++ b/www/apache13-ssl/Makefile
@@ -9,7 +9,7 @@
PORTNAME= apache+ssl
PORTVERSION= ${APACHE_VERSION}.${APACHE_SSL_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www security
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} \
${MASTER_SITES_APACHE_SSL:S/$/:ssl/}
diff --git a/www/apache13-ssl/files/patch-secfix-CAN-2005-3352 b/www/apache13-ssl/files/patch-secfix-CAN-2005-3352
new file mode 100644
index 000000000000..8febc0e58935
--- /dev/null
+++ b/www/apache13-ssl/files/patch-secfix-CAN-2005-3352
@@ -0,0 +1,35 @@
+--- src/main/util.c (original)
++++ src/main/util.c Mon Dec 12 08:36:54 2005
+@@ -1722,6 +1722,8 @@
+ j += 3;
+ else if (s[i] == '&')
+ j += 4;
++ else if (s[i] == '"')
++ j += 5;
+
+ if (j == 0)
+ return ap_pstrndup(p, s, i);
+@@ -1739,6 +1741,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];
+
+--- src/modules/standard/mod_imap.c (original)
++++ src/modules/standard/mod_imap.c Mon Dec 12 08:36:54 2005
+@@ -328,7 +328,7 @@
+ if (!strcasecmp(value, "referer")) {
+ referer = ap_table_get(r->headers_in, "Referer");
+ if (referer && *referer) {
+- return ap_pstrdup(r->pool, referer);
++ return ap_escape_html(r->pool, referer);
+ }
+ else {
+ /* XXX: This used to do *value = '\0'; ... which is totally bogus
+