Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 33772 invoked from network); 26 Nov 2007 21:11:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Nov 2007 21:11:02 -0000 Received: (qmail 199 invoked by uid 500); 26 Nov 2007 21:10:46 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 132 invoked by uid 500); 26 Nov 2007 21:10:46 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 121 invoked by uid 99); 26 Nov 2007 21:10:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2007 13:10:46 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 26 Nov 2007 21:10:45 +0000 Received: (qmail 33667 invoked by uid 2161); 26 Nov 2007 21:10:24 -0000 Received: from [192.168.2.4] (euler.heimnetz.de [192.168.2.4]) by cerberus.heimnetz.de (Postfix on SuSE Linux 7.0 (i386)) with ESMTP id 6369D1721C for ; Mon, 26 Nov 2007 22:10:11 +0100 (CET) Message-ID: <474B363D.8090602@apache.org> Date: Mon, 26 Nov 2007 22:10:21 +0100 From: Ruediger Pluem User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.9) Gecko/20071030 SeaMonkey/1.1.6 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: svn commit: r598299 - in /httpd/httpd/trunk: CHANGES modules/filters/mod_filter.c References: <20071126145613.596A41A9832@eris.apache.org> In-Reply-To: <20071126145613.596A41A9832@eris.apache.org> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 11/26/2007 03:56 PM, niq@apache.org wrote: > Author: niq > Date: Mon Nov 26 06:56:12 2007 > New Revision: 598299 > > URL: http://svn.apache.org/viewvc?rev=598299&view=rev > Log: > mod_filter: don't segfault on (unsupported) chained FilterProviders. > PR 43956 > > Modified: > httpd/httpd/trunk/CHANGES > httpd/httpd/trunk/modules/filters/mod_filter.c > > Modified: httpd/httpd/trunk/CHANGES > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=598299&r1=598298&r2=598299&view=diff > ============================================================================== > --- httpd/httpd/trunk/CHANGES [utf-8] (original) > +++ httpd/httpd/trunk/CHANGES [utf-8] Mon Nov 26 06:56:12 2007 > @@ -2,6 +2,9 @@ > Changes with Apache 2.3.0 > [ When backported to 2.2.x, remove entry from this file ] > > + *) mod_filter: Don't segfault on (unsupported) chained FilterProvider usage. > + PR 43956 [Nick Kew] > + > *) mod_unique_id: Fix timestamp value in UNIQUE_ID. > PR 37064 [Kobayashi ] > > > Modified: httpd/httpd/trunk/modules/filters/mod_filter.c > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_filter.c?rev=598299&r1=598298&r2=598299&view=diff > ============================================================================== > --- httpd/httpd/trunk/modules/filters/mod_filter.c (original) > +++ httpd/httpd/trunk/modules/filters/mod_filter.c Mon Nov 26 06:56:12 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, > Wouldn't it make more sense to prevent this already at configuration time instead of failing during request processing (the request processing check seems to be a good sanity check that should stay)? How about deleting the following code from filter_provider? if (!provider_frec) { provider_frec = apr_hash_get(cfg->live_filters, pname, APR_HASH_KEY_STRING); } Regards RĂ¼diger