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 49859] url with additional filepath generates bad environment variables.
Date Wed, 01 Sep 2010 16:03:19 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49859

Ben Griffin <ben@redsnapper.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #2 from Ben Griffin <ben@redsnapper.net> 2010-09-01 12:03:17 EDT ---
Eric, thanks. I read up on your comments. I attempted to post a mail as
suggested, but was refused.

"AcceptPathInfo Off" appears to have no effect when using a suffix handler via
AddHandler (the handler in the bug report's case is a bash script calling set)

The documentation says:
http://httpd.apache.org/docs/2.0/mod/core.html#acceptpathinfo
"For example, assume the location /test/ points to a directory that contains
only the single file here.html. Then requests for/test/here.html/more and
/test/nothere.html/more both collect /more as PATH_INFO."

"Therefore a request with trailing pathname information after the true filename
such as /test/here.html/more in the above example will return a 404 NOT FOUND
error."

However, this is not what I find.

Here is the entire apache config file. (note that this is based on a Mac, but
the original bug was found on Debian Linux)

apache.conf follows (dso.conf is the default set of modules)
#================================================
Include /etc/apache2/dso.conf
ServerRoot /Library/WebServer
Listen 80

User _www
Group _www 

<Directory /Library/WebServer/CGI-Executables/>
    Options +ExecCGI
</Directory>

AddHandler    cgi-script            .cgi
AddType       application/test        .tst

ScriptAlias  /cgi/    /Library/WebServer/CGI-Executables/
Action       application/test        /cgi/set.cgi

<VirtualHost *:80>
AcceptPathInfo Off
Options -Indexes +FollowSymLinks
DocumentRoot   Documents/public
</VirtualHost>
#================================================

set.cgi follows
#================================================
#!/bin/bash
echo Status: 200 OK
echo Content-Type: text/plain
echo
set
#================================================

Directory /Library/WebServer/Documents/public contains one file, called
"here.tst" which is a text file containing the word "test"

Results from the above setting. (taken from the environment as listed by
set.cgi above)
NOTE THAT AcceptPathInfo IS OFF

http://127.0.0.1/here.tst/more

PATH_INFO=/here.tst/more
PATH_TRANSLATED=/Library/WebServer/Documents/public/here.tst/more

What I expect is a 404 - after all, AcceptPathInfo is OFF.

If this is not a bug, how do I ensure that PATH_TRANSLATED always points to a
valid file, especially when using AddHandler

-- 
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