From 3dd5583b0bb3fefd4a6310bb6defc00366a494c8 Mon Sep 17 00:00:00 2001 From: "Roy T. Fielding" Date: Mon, 14 Jul 2003 13:26:14 +0000 Subject: [PATCH] When the top-level directory section for / was added for the sake of performance and to allow automount symlinks to be followed, we mistakenly opened access to the entire directory system by default. I noticed this because all of the /~user directories are available by default without any restrictions, which is a bad idea for anything other than one server within a department of shared users. However, it also makes it easier to serve files anywhere on disk by mistake, and makes other URI-handling bugs more severe than they would be otherwise. Therefore, this patch reinstates access control to deny access to all files other than under DocumentRoot, icons, and manual, until additional directory/locations are explicitly allowed by the admin. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100593 13f79535-47bb-0310-9956-ffa450edef68 --- docs/conf/httpd-std.conf.in | 5 ++++- docs/conf/httpd-win.conf | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/conf/httpd-std.conf.in b/docs/conf/httpd-std.conf.in index 8dd7534e5f..2d00028bc2 100644 --- a/docs/conf/httpd-std.conf.in +++ b/docs/conf/httpd-std.conf.in @@ -317,6 +317,8 @@ DocumentRoot "@exp_htdocsdir@" Options FollowSymLinks AllowOverride None + Order deny,allow + Deny from all # @@ -362,7 +364,8 @@ DocumentRoot "@exp_htdocsdir@" # # UserDir: The name of the directory that is appended onto a user's home -# directory if a ~user request is received. +# directory if a ~user request is received. Note that you must also set +# the default access control for these directories, as in the example below. # UserDir public_html diff --git a/docs/conf/httpd-win.conf b/docs/conf/httpd-win.conf index 872326255c..ffc29c5ca3 100644 --- a/docs/conf/httpd-win.conf +++ b/docs/conf/httpd-win.conf @@ -244,6 +244,8 @@ DocumentRoot "@@ServerRoot@@/htdocs" Options FollowSymLinks AllowOverride None + Order deny,allow + Deny from all # @@ -291,7 +293,8 @@ DocumentRoot "@@ServerRoot@@/htdocs" # UserDir: The name of the directory that is appended onto a user's home # directory if a ~user request is received. Be especially careful to use # proper, forward slashes here. On Windows NT, "Personal/My Website" -# is a more appropriate choice. +# is a more appropriate choice. Note that you must also set the default +# access control for these directories, as in the example below. # UserDir "My Documents/My Website" -- 2.40.0