httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_include.c
Date Tue, 13 Jan 2004 22:12:03 GMT
nd          2004/01/13 14:12:03

  Modified:    modules/filters mod_include.c
  Log:
  bust the "recursive include" test. It's no longer necessary and prevents
  users from careful use of the feature.
  
  Revision  Changes    Path
  1.296     +0 -44     httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.295
  retrieving revision 1.296
  diff -u -u -r1.295 -r1.296
  --- mod_include.c	2 Jan 2004 23:45:06 -0000	1.295
  +++ mod_include.c	13 Jan 2004 22:12:02 -0000	1.296
  @@ -1731,50 +1731,6 @@
                           "file %s";
           }
   
  -        if (!error_fmt) {
  -            int founddupe = 0;
  -            request_rec *p, *q;
  -
  -            /* 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.
  -             */
  -             for (p = r; p && !founddupe; p = p->main) {
  -                for (q = p; q; 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) {
  -                error_fmt = "Recursive include of \"%s\" in parsed file %s";
  -            }
  -        }
  -
           /* See the Kludge in includes_filter for why.
            * Basically, it puts a bread crumb in here, then looks
            * for the crumb later to see if its been here.
  
  
  

Mime
View raw message