1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-13 21:42:17 +03:00
Commit Graph

419 Commits

Author SHA1 Message Date
Ben Reser
fb5675a5b8 mod_dav: Fix invalid Location header when a resource is created by passing an
absolute URI on the request line.

Using r->unparsed_uri is wrong since it might contain a scheme, hostname and
port.  See section 5.1.2 of RFC 2616, an absolute URI is allowed.  The
unparsed_uri field is absolutely unparsed.  The current code causes the
Location header to end up having the scheme, host and port included twice.

* modules/dav/main/mod_dav.c
  (dav_created): Call ap_escape_uri() on r->uri when caller doesn't provide a
    location.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592655 13f79535-47bb-0310-9956-ffa450edef68
2014-05-06 05:00:21 +00:00
Christophe Jaillet
4ed59c4673 Typo in comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588862 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 09:33:41 +00:00
Christophe Jaillet
f8afa5bc25 Style, indentation. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1557317 13f79535-47bb-0310-9956-ffa450edef68
2014-01-11 06:32:59 +00:00
Christophe Jaillet
68b018c3eb Add missing break in 'dav_generic_do_refresh' to avoid useless computation.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1556914 13f79535-47bb-0310-9956-ffa450edef68
2014-01-09 18:48:11 +00:00
Christophe Jaillet
58af80a630 As in 'dav_generic_do_refresh', add missing break in 'dav_fs_do_refresh' to avoid useless computation.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1556911 13f79535-47bb-0310-9956-ffa450edef68
2014-01-09 18:44:50 +00:00
Ben Reser
02780d57bd SECURITY: CVE-2013-6438 (cve.mitre.org)
mod_dav: Keep track of length of cdata properly when removing leading spaces.

* modules/dav/main/util.c
  (dav_xml_get_cdata): reduce len variable when increasing cdata pointer.

Submitted by: Amin Tora <Amin.Tora neustar.biz>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1556428 13f79535-47bb-0310-9956-ffa450edef68
2014-01-08 02:40:38 +00:00
Jeff Trawick
30f8aa6460 more apr_file_write_full() simplification (like r1542413)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542416 13f79535-47bb-0310-9956-ffa450edef68
2013-11-15 22:03:16 +00:00
Ben Reser
31a3eab6d7 Followup to r1529559: mod_dav_fs: Fix encoding of hrefs in PROPFIND response.
Previous commit missed encoding the names of the children of the PROPFIND
request when the depth wasn't 0.

* modules/dav/fs/repos.c
  (dav_fs_append_uri): New function
  (dav_fs_walker): Use dav_fs_append_uri() and adjust length calculations to
    use the encoded length.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1531505 13f79535-47bb-0310-9956-ffa450edef68
2013-10-12 06:13:20 +00:00
Ben Reser
4de0b69f7f Fix PR 55397: dav_resource->uri treated as an unparsed uri.
The change made for PR 54611 caused this field to be treated as
unescaped.  mod_dav_svn however, provided escaped URIs.  Essentially
breaking support for paths with non-URI safe characters in SVN.

Adjust the code so that dav_resource->uri is assumed to be escaped and
adjust mod_dav_fs so that it uses escaped URIs in this field.

* modules/dav/fs/repos.c
  (dav_fs_get_resource): Use the unparsed_uri to contruct the resource uri.

* modules/dav/main/mod_dav.c
  (dav_xml_escape_uri): Do not uri escape, just handle xml escaping.
  (dav_created): Assume that locn if provided is escaped.
  (dav_method_copymove, dav_method_bind): Use the unparsed_uri on the request
    when calling dav_created() to adjust to locn assuming it is escaped.

* modules/dav/main/mod_dav.h
  (dav_resource): Document that uri is escaped.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1529559 13f79535-47bb-0310-9956-ffa450edef68
2013-10-06 01:08:51 +00:00
Ben Reser
3c6d4757a1 mod_dav: Fix PR 55306.
Makes mod_dav no longer require that the lock token be provided when the
source of a COPY is locked.  The prior behavior was in violating of
RFC 4918 which says that the lock token is only required on resources
that may be modified by the method.

* modules/dav/main/mod_dav.h
  (DAV_VALIDATE_NO_MODIFY): New flag to be passed to dav_validate_* functions.

* modules/dav/main/mod_dav.c
  (dav_method_copymove): Use the new flag when calling dav_validate_request()
    on the COPY source.

* modules/dav/main/util.c
  (dav_validate_resource_state): Use the flag to decide to ignore if the lock
    token is not provided.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1528718 13f79535-47bb-0310-9956-ffa450edef68
2013-10-03 05:29:35 +00:00
Jan Kaluža
79f70135fb mod_dav: set r->status_line in dav_error_response.
It's used as argument in next ap_rvputs call. PR 55426.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527509 13f79535-47bb-0310-9956-ffa450edef68
2013-09-30 10:35:52 +00:00
Greg Stein
b95a5db5cb Fix bug #55304 with the provided patch, slightly reformatted.
In short: do not validate conditions of a COPY source's parent since
it is not modified during the operation.

* modules/dav/main/mod_dav.c:
  (dav_method_copymove): adjust params to dav_validate_request()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1506714 13f79535-47bb-0310-9956-ffa450edef68
2013-07-24 21:09:38 +00:00
Rainer Jung
5dde0f74ca Fix indentation (plus now needed line-wrap).
Followup to r1470940.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1497588 13f79535-47bb-0310-9956-ffa450edef68
2013-06-27 22:25:56 +00:00
Graham Leggett
c340f7e666 Clarify the existing behavior.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1486027 13f79535-47bb-0310-9956-ffa450edef68
2013-05-24 12:02:28 +00:00
Graham Leggett
0d1d5098ac Reverting as per veto in http://svn.apache.org/r1486021.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1486026 13f79535-47bb-0310-9956-ffa450edef68
2013-05-24 11:59:51 +00:00
Graham Leggett
87367647de CVE-2013-1896
mod_dav: Sending a MERGE request against a URI handled by mod_dav_svn with
the source href (sent as part of the request body as XML) pointing to a
URI that is not configured for DAV will trigger a segfault.

Submitted by: Ben Reser <ben reser.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1485668 13f79535-47bb-0310-9956-ffa450edef68
2013-05-23 12:52:06 +00:00
Graham Leggett
9bc9d79079 core: Stop the HTTP_IN filter from attempting to write error buckets
to the output filters, which is bogus in the proxy case. Create a
clean mapping from APR codes to HTTP status codes, and use it where
needed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1482522 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 18:58:06 +00:00
Graham Leggett
26548fee8b mod_dav: mod_dav overrides dav_fs response on PUT failure. PR 35981.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1477687 13f79535-47bb-0310-9956-ffa450edef68
2013-04-30 15:28:57 +00:00
Graham Leggett
42f0d9dd77 mod_dav: Make sure the URI length is calculated correctly.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1477530 13f79535-47bb-0310-9956-ffa450edef68
2013-04-30 10:15:23 +00:00
Graham Leggett
767bded576 mod_dav: Do not segfault on PROPFIND with a zero length DBM. PR 52559
Submitted by: Diego Santa Cruz <diego.santaCruz spinetix.com>
Tested by William Lewis <wiml omnigroup com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1476645 13f79535-47bb-0310-9956-ffa450edef68
2013-04-27 17:52:03 +00:00
Graham Leggett
206e02d428 mod_dav: Do not fail PROPPATCH when prop namespace is not known. PR 52559
Submitted by: Diego Santa Cruz <diego.santaCruz spinetix.com>
Tested by William Lewis <wiml omnigroup com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1476644 13f79535-47bb-0310-9956-ffa450edef68
2013-04-27 17:44:36 +00:00
Graham Leggett
24356db0c5 mod_dav: When a PROPPATCH attempts to remove a non-existent dead
property on a resource for which there is no dead property in the same
namespace httpd segfaults. PR 52559
Submitted by Diego Santa Cruz <diego.santaCruz spinetix.com>
Tested by William Lewis <wiml omnigroup com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1476642 13f79535-47bb-0310-9956-ffa450edef68
2013-04-27 17:38:45 +00:00
Graham Leggett
0baf2d9383 mod_dav: PROPPATCH delete (svn propdel) silently discards errors. PR 53525
Submitted by Arwin Arni <arwin collab.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1476627 13f79535-47bb-0310-9956-ffa450edef68
2013-04-27 17:08:22 +00:00
Graham Leggett
455a86c472 mod_dav: Ensure URI is correctly uriencoded on return. PR 54611
Patch submitted by Timothy Wood <tjw omnigroup com>
Tested by William Lewis <wiml omnigroup com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1476621 13f79535-47bb-0310-9956-ffa450edef68
2013-04-27 16:55:44 +00:00
Graham Leggett
b953a0a424 mod_dav: Sending an If or If-Match header with an invalid ETag doesn't
result in a 412 Precondition Failed for a COPY operation.

PR: 54610
Submitted by: Timothy Wood <tjw omnigroup.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1476604 13f79535-47bb-0310-9956-ffa450edef68
2013-04-27 15:40:18 +00:00
Graham Leggett
1416de62f5 mod_dav: Make sure that when we prepare an If URL for Etag comparison,
we compare unencoded paths. PR 53910
Patch submitted by Timothy Wood <tjw omnigroup com>
Tested by William Lewis <wiml omnigroup com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470940 13f79535-47bb-0310-9956-ffa450edef68
2013-04-23 13:14:34 +00:00
Jeff Trawick
4149fb80f4 mod_dav: Improve error handling in dav_method_put(), add new
dav_join_error() function.

PR: 54145

Submitted by: Ben Reser <ben reser.org>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1464241 13f79535-47bb-0310-9956-ffa450edef68
2013-04-04 00:22:52 +00:00
Christophe Jaillet
f0d65aca48 [Test] First try : remove extra ';'
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1397320 13f79535-47bb-0310-9956-ffa450edef68
2012-10-11 21:27:18 +00:00
Guenter Knauf
7814748ab3 NetWare build tweaks.
Make more use of internal makefile macros;
axed now obsolete include paths.
Submitted by: normw gknw net.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1371177 13f79535-47bb-0310-9956-ffa450edef68
2012-08-09 12:11:09 +00:00
Stefan Fritsch
fe4f92509b Replace use of apr_file_write() with apr_file_write_full() to prevent
incomplete writes.

Add comments in some places where error handling/logging is missing.

PR: 53131.
Submitted by: Nicolas Viennot <apache viennot biz>, Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1331110 13f79535-47bb-0310-9956-ffa450edef68
2012-04-26 21:44:51 +00:00
Stefan Fritsch
21cc07a470 Make APACHE_MODULE() accept an optional prerequisite module for configure.
Introduce the following configure time dependencies:
  mod_proxy_* (except proxy_html) require mod_proxy
  mod_dav_* require mod_dav
  mod_session_* require mod_session


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1234180 13f79535-47bb-0310-9956-ffa450edef68
2012-01-20 22:14:31 +00:00
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Stefan Fritsch
a3ffb7e3df Remove some ap_add_version_component() calls that don't provide any information
because the modules don't have separate version numbers anymore


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199532 13f79535-47bb-0310-9956-ffa450edef68
2011-11-08 23:37:13 +00:00
Stefan Fritsch
ebfb6ac9c9 Don't send a 500 if there is a timeout
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199444 13f79535-47bb-0310-9956-ffa450edef68
2011-11-08 20:36:03 +00:00
Stefan Fritsch
ccc76d4e43 Change default FileETag to be "size mtime", i.e. remove the inode. Adjust the
etag generation in mod_dav_fs to the new default.

PR 49623.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199086 13f79535-47bb-0310-9956-ffa450edef68
2011-11-08 03:06:08 +00:00
Stefan Fritsch
1951a037bf More cleanup: Expand tabs and some more indentation fixes
No functional change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Eric Covener
c45e14b246 refactor to pull setting of Accept-Ranges header into http_protocol.c which
had been copied to other handlers.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166663 13f79535-47bb-0310-9956-ffa450edef68
2011-09-08 12:56:08 +00:00
Stefan Fritsch
32d9e326ef adjustments of build priorities of modules without special dependencies
all -> most:
- mod_sed

reallyall -> most:
- mod_log_debug

reallyall -> all:
- mod_dav_lock
- mod_echo
- mod_charset_lite
- mod_slotmem_plain
- mod_dialup

few -> all:
- mod_data
- mod_reflector
- mod_asis

most -> all:
- mod_heartbeat
- mod_heartmonitor
- mod_watchdog

most -> reallyall:
- mod_imagemap
- mod_cern_meta
- mod_ident

See thread at
http://mail-archives.apache.org/mod_mbox/httpd-dev/201107.mbox/%3C201107052321.56063.sf@sfritsch.de%3E


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1146227 13f79535-47bb-0310-9956-ffa450edef68
2011-07-13 18:59:28 +00:00
Stefan Fritsch
51692222f6 Various code cleanup
PR: 51398
Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1138627 13f79535-47bb-0310-9956-ffa450edef68
2011-06-22 20:45:34 +00:00
Stefan Fritsch
48345b21d0 Avoid some memory allocations by using apr_table_setn where the string arguments
are allocated from the request pool and not modified later on.

Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 51358


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1135084 13f79535-47bb-0310-9956-ffa450edef68
2011-06-13 11:04:29 +00:00
Stefan Fritsch
c67e7d5dd0 Log the proper module name on errors
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1133163 13f79535-47bb-0310-9956-ffa450edef68
2011-06-07 20:58:45 +00:00
Stefan Fritsch
afe7630907 Log a more obvious message if apr cannot load its dbm shared library.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1133158 13f79535-47bb-0310-9956-ffa450edef68
2011-06-07 20:55:56 +00:00
Stefan Fritsch
c405eb5299 Don't return an undefined value if opening of a read-only database fails.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1133152 13f79535-47bb-0310-9956-ffa450edef68
2011-06-07 20:40:21 +00:00
Stefan Fritsch
51226bdcca Fix various "variable 'x' set but not used" warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1125877 13f79535-47bb-0310-9956-ffa450edef68
2011-05-22 07:42:18 +00:00
Stefan Fritsch
2014acf62f Improvements found by cppcheck:
remove some unused variables and dead assignments, reduce the scope of some
variables, add some parens to improve readability


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103459 13f79535-47bb-0310-9956-ffa450edef68
2011-05-15 16:58:45 +00:00
Guenter Knauf
10b8e04753 Create dav.imp dynamically from header to catch all exports.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1083540 13f79535-47bb-0310-9956-ffa450edef68
2011-03-20 19:14:45 +00:00
Guenter Knauf
db1cf0ac7f Removed dav_get_limit_xml_body() from mod_dav.h.
This was a forgotten prototype hanging around for close
to 11 years where no code for existed (see r85816);
now removed from all branches per wrowe's permission.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1083536 13f79535-47bb-0310-9956-ffa450edef68
2011-03-20 18:58:27 +00:00
Guenter Knauf
7c1e9bf7c9 More NetWare build fixes.
Sorted some makefile dependencies; fixed DAV makefiles.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1083478 13f79535-47bb-0310-9956-ffa450edef68
2011-03-20 15:56:39 +00:00
Guenter Knauf
888ec80125 Use a var INSTALLBASE to simplify NetWare installation rules.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082821 13f79535-47bb-0310-9956-ffa450edef68
2011-03-18 04:56:06 +00:00