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 2003/01/26 23:46:31 UTC
cvs commit: apache-1.3/src/modules/standard mod_rewrite.c
nd 2003/01/26 14:46:31
Modified: src CHANGES
src/modules/standard mod_rewrite.c
Log:
Backport from 2.0: Allow RewriteEngine Off even if Options -FollowSymlinks
PR: 12395
Revision Changes Path
1.1873 +4 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1872
retrieving revision 1.1873
diff -u -r1.1872 -r1.1873
--- CHANGES 23 Jan 2003 12:09:46 -0000 1.1872
+++ CHANGES 26 Jan 2003 22:46:30 -0000 1.1873
@@ -1,5 +1,9 @@
Changes with Apache 1.3.28
+ *) mod_rewrite: Allow "RewriteEngine Off" even if no
+ "Options FollowSymlinks" (or SymlinksIfOwnermatch) is set.
+ PR 12395. [Andr� Malo]
+
*) Change the log messages for setsockopt(TCP_NODELAY) and
getsockname() failures to log the client IP address and to
change the log level to debug. [Jeff Trawick]
1.180 +8 -8 apache-1.3/src/modules/standard/mod_rewrite.c
Index: mod_rewrite.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -r1.179 -r1.180
--- mod_rewrite.c 12 Dec 2002 16:09:52 -0000 1.179
+++ mod_rewrite.c 26 Jan 2003 22:46:31 -0000 1.180
@@ -1355,6 +1355,14 @@
* only do something under runtime if the engine is really enabled,
* for this directory, else return immediately!
*/
+ if (dconf->state == ENGINE_DISABLED) {
+ return DECLINED;
+ }
+
+ /*
+ * Do the Options check after engine check, so
+ * the user is able to explicitely turn RewriteEngine Off.
+ */
if (!(ap_allow_options(r) & (OPT_SYM_LINKS | OPT_SYM_OWNER))) {
/* FollowSymLinks is mandatory! */
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
@@ -1362,14 +1370,6 @@
"which implies that RewriteRule directive is forbidden: "
"%s", r->filename);
return FORBIDDEN;
- }
- else {
- /* FollowSymLinks is given, but the user can
- * still turn off the rewriting engine
- */
- if (dconf->state == ENGINE_DISABLED) {
- return DECLINED;
- }
}
/*