You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Todd Vierling <tv...@pobox.com> on 1998/12/07 16:08:00 UTC

mod_include/3500: mod_include unconditionally disallows parent directories

>Number:         3500
>Category:       mod_include
>Synopsis:       mod_include unconditionally disallows parent directories
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Mon Dec  7 07:10:00 PST 1998
>Last-Modified:
>Originator:     tv@pobox.com
>Organization:
apache
>Release:        1.3.3
>Environment:
Any
>Description:
Apache's mod_include calls ap_getparents() when doing an <!--#include--> directive.
This is not just for `IncludesNOEXEC' pages, but also for `Includes' pages.
It's trivial to come up with a way around this bogus restriction in shtml files
if execution of programs is allowed ("cat filename" comes to mind).
>How-To-Repeat:
<!--#include file="../hi.txt"-->
>Fix:
Only call ap_getparents on `IncludesNOEXEC'.  Allow parent directories otherwise
(i.e., for pages with full `Includes' privileges).
Ideally, mod_include should have some way to figure out if a relative path
with `../' in it is within the user's allowed web tree, but that solution is
pipe dream at best.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[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!         ]