Opened 18 years ago

Last modified 6 years ago

#7277 reopened defect

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

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

Description (last modified by jmpp@…)

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 (3)

comment:1 Changed 17 years ago by nox@…

Cc: nox@… added
Milestone: Port Bugs
Priority: ExpectedHigh
Version: 1.2

As this is a security issue, I've set the priority to High

comment:2 Changed 16 years ago by nox@…

Cc: ryandesign@… added
Owner: changed from james@… to imajes@…

Maybe we should fix it without James approval? That's a security issue.

comment:3 Changed 16 years ago by jmpp@…

Description: modified (diff)
Note: See TracTickets for help on using tickets.