httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject ugly problem with sub-requests
Date Tue, 23 Feb 1999 12:25:47 GMT
Hi all,

In my mod_dav module, I'm using the sub-request mechanism to map the
destination of a move/copy onto a directory/file in the filesystem.

This is reasonably straight-forward. The sub-req mechanism doesn't take
an absolute URI, so I do some munging before calling it. Not a big deal,
although it would be nice to see the sub-req system take absolute URIs.

The *real* problem here is with ap_set_sub_req_protocol(). It hard-codes
the sub-request to use the "GET" method. For mod_dav, this means that
the target is authorized as a GET rather than a MOVE.

Needless to say, if the filesystem has the right permissions, it means
that somebody with access to the MOVE method can stomp files anywhere in
Apache's URL namespace. And there is no way to <limit> it.

I started to make a private copy of ap_sub_req_lookup_uri() and
ap_set_sub_req_protocol() so that I could change the method. Great,
until I realized that I also need a bazillion functions from
http_request.c such as file_walk(), directory_walk(), etc. It looks
almost like I would need to snarf in almost all of http_request.c!

It looks like maybe I could do a gross hack: call the sub-req mechanism,
tweak the method, and then call access/auth functions again.

I'm at a loss. Any help/ideas here would be appreciated.

thx!
-g

p.s. and yes, this is also a plea for changes in 1.3.5 and/or 2.0; I'll
help spec the requirements and/or provide code if needed... this is
quite important for providing DAV via Apache

--
Greg Stein, http://www.lyra.org/

Mime
View raw message