]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
bust the "recursive include" test. It's no longer necessary and
authorAndré Malo <nd@apache.org>
Fri, 27 Aug 2004 19:41:22 +0000 (19:41 +0000)
committerAndré Malo <nd@apache.org>
Fri, 27 Aug 2004 19:41:22 +0000 (19:41 +0000)
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

CHANGES
STATUS
modules/filters/mod_include.c

diff --git a/CHANGES b/CHANGES
index 2cc707fe95a20281f804a940a94699158623dbbf..a9767eeb946aa32c05f39b810004cf9c2642e29e 100644 (file)
--- 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 <shengperson yahoo.com>, André Malo]
 
diff --git a/STATUS b/STATUS
index a4338283dce071988774b9c2877753b4b1eb9dbe..a2d3760d479756cde81b81f19802e40241cff60d 100644 (file)
--- 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
index 2cf8fff651f5da29dcdadfb939f49d7efa3f5480..751f9086e3ef47ae7b43f6bd9fd63de802bc125e 100644 (file)
@@ -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.
-                     * <!--#include virtual=
-                     *      "$REQUEST_URI/$QUERY_STRING?$QUERY_STRING/x" -->
-                     * 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 */