You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2007/12/08 15:07:27 UTC
svn commit: r602472 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS
modules/filters/mod_filter.c
Author: jim
Date: Sat Dec 8 06:07:25 2007
New Revision: 602472
URL: http://svn.apache.org/viewvc?rev=602472&view=rev
Log:
Merge r598299, r599393 from trunk:
mod_filter: don't segfault on (unsupported) chained FilterProviders.
PR 43956
Since we don't support chained filters, and can't expect to while the
filter_init problem remains, we should make it clear to users at startup time.
Submitted by: niq
Reviewed by: jim
Modified:
httpd/httpd/branches/2.2.x/CHANGES
httpd/httpd/branches/2.2.x/STATUS
httpd/httpd/branches/2.2.x/modules/filters/mod_filter.c
Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=602472&r1=602471&r2=602472&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Sat Dec 8 06:07:25 2007
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.2.7
+ *) mod_filter: Don't segfault on (unsupported) chained FilterProvider usage.
+ PR 43956 [Nick Kew, Ruediger Pluem]
+
*) core: Handle unrecognised transfer-encodings.
PR 43882 [Nick Kew, Jeff Trawick]
Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=602472&r1=602471&r2=602472&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Sat Dec 8 06:07:25 2007
@@ -79,12 +79,6 @@
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * mod_filter: Don't try to support chained filters when it doesn't work
- PR 43956
- http://svn.apache.org/viewvc?view=rev&revision=598299
- http://svn.apache.org/viewvc?view=rev&revision=599393
- +1: niq, rpluem, jim
-
* 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>]
Modified: httpd/httpd/branches/2.2.x/modules/filters/mod_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/filters/mod_filter.c?rev=602472&r1=602471&r2=602472&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/filters/mod_filter.c (original)
+++ httpd/httpd/branches/2.2.x/modules/filters/mod_filter.c Sat Dec 8 06:07:25 2007
@@ -137,7 +137,12 @@
harness_ctx *fctx = apr_pcalloc(f->r->pool, sizeof(harness_ctx));
for (p = filter->providers; p; p = p->next) {
- if (p->frec->filter_init_func) {
+ if (p->frec->filter_init_func == filter_init) {
+ ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c,
+ "Chaining of FilterProviders not supported");
+ return HTTP_INTERNAL_SERVER_ERROR;
+ }
+ else if (p->frec->filter_init_func) {
f->ctx = NULL;
if ((err = p->frec->filter_init_func(f)) != OK) {
ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c,
@@ -532,10 +537,6 @@
/* if provider has been registered, we can look it up */
provider_frec = ap_get_output_filter_handle(pname);
- if (!provider_frec) {
- provider_frec = apr_hash_get(cfg->live_filters, pname,
- APR_HASH_KEY_STRING);
- }
if (!provider_frec) {
return apr_psprintf(cmd->pool, "Unknown filter provider %s", pname);
}