From: André Malo Date: Fri, 27 Aug 2004 19:41:22 +0000 (+0000) Subject: bust the "recursive include" test. It's no longer necessary and X-Git-Tag: STRIKER_2_0_51_RC1^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08b202641eb12a17db126b82cf930fd86f9453ed;p=thirdparty%2Fapache%2Fhttpd.git bust the "recursive include" test. It's no longer necessary and prevents users from careful use of the feature. Reviewed by: Justin Erenkrantz, Joe Orton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@104865 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 2cc707fe95a..a9767eeb946 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.51 + *) mod_include no longer checks for recursion, because that's done + in the core. This allows for carefully usage of recursive SSI. + [André Malo] + *) Fix memory leak in the cache handling of mod_rewrite. PR 27862. [chunyan sheng , André Malo] diff --git a/STATUS b/STATUS index a4338283dce..a2d3760d479 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2004/08/27 19:23:24 $] +Last modified at [$Date: 2004/08/27 19:41:21 $] Release: @@ -162,18 +162,6 @@ PATCHES TO BACKPORT FROM 2.1 http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/loggers/mod_log_config.c?r1=1.118&r2=1.119 +1: trawick, nd, jerenkrantz - *) mod_include: remove "recursive-include" check, it's no longer - necessary and forbids legal actions. - modules/filters/mod_include.c: r1.296 - jerenkrantz: ISTR, we forbid recursive checks elsewhere, but I've - completely forgotten where. - nd: we stop recursions in the core now (for subrequests and internal - redirects). Therefore the check here is no longer necessary. - jerenkrantz: Aha. ap_is_recursion_limit_exceeded() is the function - I was thinking of, but couldn't find. (I was searching for - 'recursive' not 'recursion'.) - +1: nd, jerenkrantz, jorton - *) mod_dav: Send an EOS at the end of the multistatus brigade. http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/dav/main/mod_dav.c?r1=1.105&r2=1.106 +1: jorton, jerenkrantz diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 2cf8fff651f..751f9086e3e 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -770,50 +770,6 @@ static int handle_include(include_ctx_t *ctx, apr_bucket_brigade **bb, error_fmt = "unable to include potential exec \"%s\" " "in parsed file %s"; } - if (error_fmt == NULL) { - /* try to avoid recursive includes. We do this by walking - * up the r->main list of subrequests, and at each level - * walking back through any internal redirects. At each - * step, we compare the filenames and the URIs. - * - * The filename comparison catches a recursive include - * with an ever-changing URL, eg. - * - * which, although they would eventually be caught because - * we have a limit on the length of files, etc., can - * recurse for a while. - * - * The URI comparison catches the case where the filename - * is changed while processing the request, so the - * current name is never the same as any previous one. - * This can happen with "DocumentRoot /foo" when you - * request "/" on the server and it includes "/". - * This only applies to modules such as mod_dir that - * (somewhat improperly) mess with r->filename outside - * of a filename translation phase. - */ - int founddupe = 0; - request_rec *p; - for (p = r; p != NULL && !founddupe; p = p->main) { - request_rec *q; - for (q = p; q != NULL; q = q->prev) { - if ((q->filename && rr->filename && - (strcmp(q->filename, rr->filename) == 0)) || - ((*q->uri == '/') && - (strcmp(q->uri, rr->uri) == 0))) - { - founddupe = 1; - break; - } - } - } - - if (p != NULL) { - error_fmt = "Recursive include of \"%s\" " - "in parsed file %s"; - } - } /* See the Kludge in send_parsed_file for why */ /* Basically, it puts a bread crumb in here, then looks */