Skip to content

[Bug]: WebDAV accepts fragment-bearing request targets for destructive methods #424

Description

@AptS-1547

What happened?

The pinned Litmus 0.13 basic suite introduced for #421 reports that AsterDrive performs a destructive WebDAV mutation when the raw request target contains a URI fragment.

In delete_fragment, Litmus sends a fragment-bearing DELETE request target. AsterDrive resolves it to the collection resource and removes that resource. URI fragments are not part of the HTTP request-target sent to an origin server, so accepting such a raw target for mutation creates ambiguous and unsafe path semantics.

Parent roadmap: #421

Steps to reproduce

  1. Create a WebDAV collection.
  2. Send a raw DELETE request whose request-target appends #fragment to that collection URI.
  3. Query the original collection URI.
  4. Alternatively, run pinned Litmus 0.13 group basic and inspect delete_fragment.

Expected behavior

  • Fragment-bearing HTTP/WebDAV request targets are rejected before path resolution, preferably with 400 Bad Request.
  • The underlying resource remains unchanged.
  • The validation is shared by destructive WebDAV methods rather than patched only in DELETE.
  • Regression tests cover DELETE, MKCOL, PUT, COPY, MOVE, and encoded # path segments so a legitimate %23 filename remains distinct from a raw fragment delimiter.
  • Litmus 0.13 no longer emits the unsafe delete_fragment warning.

Actual behavior

Litmus reports:

WARNING: DELETE removed collection resource with Request-URI including fragment; unsafe

The collection is deleted successfully.

AsterDrive version

v0.4.0-rc.2 / current develop at 8584c3cf

Installation method

Built from source

Database backend

SQLite

Storage backend involved

WebDAV client path

Environment

  • OS / distro: isolated integration-test server; Litmus client runs from pinned Ubuntu 24.04 tooling
  • Browser or WebDAV client: Litmus 0.13 basic
  • Reverse proxy: none
  • Deployment notes: local filesystem-backed test policy

Error messages / logs

basic: delete_fragment passed with 1 protocol warning

Relevant configuration

# Default WebDAV test configuration.

Checklist

  • I have searched existing issues for duplicates
  • I have checked the documentation and FAQ
  • I have removed secrets and private credentials from this report

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingDependenciesPull requests that update a dependency filePriority: LowLow priority issueRustPull requests that update Rust code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions