Opened 18 years ago

Last modified 6 years ago

#7277 reopened defect

Protect .ht* files case insensitively by default (apache2 port) — at Initial Version

Reported by: opendarwin-2006@… Owned by: james@…
Priority: High Milestone:
Component: ports Version:
Keywords: Cc:
Port: apache2, apache20, apache

Description

By default the apache2 port installs an httpd.conf containing this section which is supposed to prevent malicious users from reading the contents of .htaccess or .htpasswd files:

# The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # <FilesMatch "\.ht">

Order allow,deny Deny from all

</FilesMatch>

This is insufficient on file systems which are case insensitive, such as Mac OS X's default HFS+ file system. Mac OS X also has other files and directories inside each directory which must not be made accessible to web visitors. See Apple's knowledge base article:

http://docs.info.apple.com/article.html?artnum=300422

The updated rules provided in that knowledge base article should be patched into the default httpd.conf file provided through darwinports so that users are by default protected from this problem.

Someone should also examine the apache 1 port to see if it suffers from the same problem, and patch it too if necessary (possibly creating a separate bug report if necessary).

This issue is related a bit to bug #803.

Change History (0)

Note: See TracTickets for help on using tickets.