Loading src/CHANGES +6 −0 Original line number Diff line number Diff line Changes with Apache 1.3.35 *) 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] *) mod_cgi: Remove block on OPTIONS method so that scripts can respond to OPTIONS directly rather than via server default. [Roy Fielding] PR 15242 Loading src/main/util.c +6 −0 Original line number Diff line number Diff line Loading @@ -1722,6 +1722,8 @@ API_EXPORT(char *) ap_escape_html(pool *p, const char *s) j += 3; else if (s[i] == '&') j += 4; else if (s[i] == '"') j += 5; if (j == 0) return ap_pstrndup(p, s, i); Loading @@ -1740,6 +1742,10 @@ API_EXPORT(char *) ap_escape_html(pool *p, const char *s) memcpy(&x[j], "&", 5); j += 4; } else if (s[i] == '"') { memcpy(&x[j], """, 6); j += 5; } else x[j] = s[i]; Loading src/modules/standard/mod_imap.c +1 −1 Original line number Diff line number Diff line Loading @@ -328,7 +328,7 @@ static char *imap_url(request_rec *r, const char *base, const char *value) 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 Loading Loading
src/CHANGES +6 −0 Original line number Diff line number Diff line Changes with Apache 1.3.35 *) 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] *) mod_cgi: Remove block on OPTIONS method so that scripts can respond to OPTIONS directly rather than via server default. [Roy Fielding] PR 15242 Loading
src/main/util.c +6 −0 Original line number Diff line number Diff line Loading @@ -1722,6 +1722,8 @@ API_EXPORT(char *) ap_escape_html(pool *p, const char *s) j += 3; else if (s[i] == '&') j += 4; else if (s[i] == '"') j += 5; if (j == 0) return ap_pstrndup(p, s, i); Loading @@ -1740,6 +1742,10 @@ API_EXPORT(char *) ap_escape_html(pool *p, const char *s) memcpy(&x[j], "&", 5); j += 4; } else if (s[i] == '"') { memcpy(&x[j], """, 6); j += 5; } else x[j] = s[i]; Loading
src/modules/standard/mod_imap.c +1 −1 Original line number Diff line number Diff line Loading @@ -328,7 +328,7 @@ static char *imap_url(request_rec *r, const char *base, const char *value) 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 Loading