
bugzilla at apache
Jun 18, 2009, 11:54 PM
Post #1 of 1
(154 views)
Permalink
|
|
[Bug 47392] New: <FilesMatch> is using the wrong directory
|
|
https://issues.apache.org/bugzilla/show_bug.cgi?id=47392 Summary: <FilesMatch> is using the wrong directory Product: Apache httpd-2 Version: 2.2.11 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Core AssignedTo: bugs[at]httpd.apache.org ReportedBy: sworddragon2[at]aol.com The <FilesMatch> directive is using the superior directory if the access through the URL is without a / at the end. Here is an example for better understanding: I created in the htdocs directory a new directory and named it test. In this directory have i created a .htaccess with the content: Allow from all <FilesMatch ^test> Deny from all </FilesMatch> And there are two empty files named test.php and another_file.php. Now the following happens: http://localhost/test -> Error 403 forbidden http://localhost/test/ -> Access is allowed and i can see the index http://localhost/test/test.php -> Error 403 forbidden http://localhost/test/another_file.php -> Access is allowed The problem is, that ^test matches of the superior directory if there is no / at the end of the URL and the access is denied. If i delete the .htaccess the following happens: http://localhost/test -> Switches to http://localhost/test/ and the i can see the index http://localhost/test/ -> Access is allowed and i can see the index http://localhost/test/test.php -> Access is allowed http://localhost/test/another_file.php -> Access is allowed -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org For additional commands, e-mail: bugs-help[at]httpd.apache.org
|