Skip to content

Validate WebDAV Depth before deleting the destination - #1252

Open
arturobernalg wants to merge 1 commit into
apache:mainfrom
arturobernalg:webdav-move-depth
Open

arturobernalg wants to merge 1 commit into
apache:mainfrom
arturobernalg:webdav-move-depth

Conversation

@arturobernalg

Copy link
Copy Markdown
Member

RFC 4918 9.9.2 requires MOVE on a collection to act as Depth: infinity. A MOVE with Depth: 0 copied only the empty collection, then deleted the source with all its members and returned 201. COPY and MOVE with an invalid Depth deleted an existing destination before rejecting the request with 400.

This follows httpd mod_dav: an invalid Depth, and Depth: 0 on a MOVE of a collection, are rejected with 400 before anything is deleted.

The new tests in TestWebdavServlet fail without the fix.

RFC 4918 9.9.2 requires MOVE on a collection to act as Depth: infinity.
A MOVE with Depth: 0 copied only the empty collection and then deleted
the source with all its members. COPY and MOVE with an invalid Depth
deleted an existing destination before rejecting the request with 400.

Follow httpd mod_dav: reject an invalid Depth, and Depth: 0 on a MOVE of
a collection, with 400 before anything is deleted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant