You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by nd...@apache.org on 2004/08/27 21:41:22 UTC
cvs commit: httpd-2.0/modules/filters mod_include.c
nd 2004/08/27 12:41:22
Modified: . Tag: APACHE_2_0_BRANCH CHANGES STATUS
modules/filters Tag: APACHE_2_0_BRANCH mod_include.c
Log:
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
Revision Changes Path
No revision
No revision
1.988.2.343 +4 -0 httpd-2.0/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/httpd-2.0/CHANGES,v
retrieving revision 1.988.2.342
retrieving revision 1.988.2.343
diff -u -u -r1.988.2.342 -r1.988.2.343
--- CHANGES 27 Aug 2004 19:23:23 -0000 1.988.2.342
+++ CHANGES 27 Aug 2004 19:41:20 -0000 1.988.2.343
@@ -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]
1.751.2.1032 +1 -13 httpd-2.0/STATUS
Index: STATUS
===================================================================
RCS file: /home/cvs/httpd-2.0/STATUS,v
retrieving revision 1.751.2.1031
retrieving revision 1.751.2.1032
diff -u -u -r1.751.2.1031 -r1.751.2.1032
--- STATUS 27 Aug 2004 19:23:24 -0000 1.751.2.1031
+++ STATUS 27 Aug 2004 19:41:21 -0000 1.751.2.1032
@@ -162,18 +162,6 @@
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
No revision
No revision
1.232.2.12 +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.232.2.11
retrieving revision 1.232.2.12
diff -u -u -r1.232.2.11 -r1.232.2.12
--- mod_include.c 28 Feb 2004 21:28:56 -0000 1.232.2.11
+++ mod_include.c 27 Aug 2004 19:41:22 -0000 1.232.2.12
@@ -770,50 +770,6 @@
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 */