httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47392] New: <FilesMatch> is using the wrong directory
Date Fri, 19 Jun 2009 06:54:37 GMT
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@httpd.apache.org
        ReportedBy: sworddragon2@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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message