Received: (qmail 79208 invoked by uid 501); 14 Jan 2001 21:41:54 -0000 Message-Id: <20010114214154.79207.qmail@apache.org> Date: 14 Jan 2001 21:41:54 -0000 From: James Marshall Reply-To: james@jmarshall.com To: submit@bugz.apache.org Subject: PATH_INFO containing %2F causes server to interpret PATH_INFO as part of file path. X-Send-Pr-Version: 3.110 >Number: 7066 >Category: protocol >Synopsis: PATH_INFO containing %2F causes server to interpret PATH_INFO as part of file path. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Sun Jan 14 13:50:01 PST 2001 >Closed-Date: Fri Jun 13 15:02:44 PDT 2003 >Last-Modified: Fri Jun 13 15:02:44 PDT 2003 >Originator: james@jmarshall.com >Release: 1.3.15-dev >Organization: >Environment: It's actually on www.apache.org; printenv.cgi shows it. >Description: Compare http://www.apache.org/printenv.cgi/path/info http://www.apache.org/printenv.cgi/path%2Finfo These should both call printenv.cgi, right? The second case results in "file not found", apparently because the server is looking for the file /printenv.cgi/path/info . Related to this, PATH_INFO is being un-URL-encoded before being passed to the script, e.g. http://www.apache.org/printenv.cgi/path%20info results in PATH_INFO of "/path info". Shouldn't it be passed along without decoding it, i.e. "/path%20info"? Otherwise, how could a script distinguish between PATH_INFOs of "/path%2Finfo" and "/path/info"? Or are such pairs always semantically equivalent? Sticky question and a can of worms, I know. When are parts of the URL encoded and when aren't they, etc. The latest CGI draft seems to imply that PATH_INFO treatment may vary by server (section 6.1.6), but this results in non-portable scripts. Granted, the CGI draft is a BCP. >How-To-Repeat: Try http://www.apache.org/printenv.cgi/path%2Finfo >Fix: What seems to be lacking is a clear definition of when things are encoded and when they aren't. I know that's very tricky to come up with. Yes, I've lost sleep trying to figure this one out. >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: coar State-Changed-When: Fri Jun 13 15:02:44 PDT 2003 State-Changed-Why: This has been addressed in Apache 2.0.46 through the AllowEncodedSlashes directive. Category-Changed-From-To: mod_cgi-protocol Category-Changed-By: coar Category-Changed-When: Fri Jun 13 15:02:44 PDT 2003 >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]