feat(drive): fix webdav back-compat

add env variable `OXICLOUD_WEBDAV_DRIVE_LISTING_PREFIX`
    which is by default:
    `OXICLOUD_WEBDAV_DRIVE_LISTING_PREFIX="@drive"`

    so `/webdav/` -> points to user's personal drive (**backward compatibilit**y)
    `/web/dav/@drive/{uuid|drive name}/` points to the respective drive

    if admins want directly `/webdav/` pointing to list of drives they need to:
    `OXICLOUD_WEBDAV_DRIVE_LISTING_PREFIX=""`

    + ensure lock is per user (RFC 4918 §9.11)

    fix: #554
This commit is contained in:
Edouard Vanbelle
2026-07-06 20:45:21 +02:00
parent 3d74bed326
commit 7e34045ff8
16 changed files with 1576 additions and 232 deletions
+4 -3
View File
@@ -34,9 +34,10 @@ wipe_storage() {
fi
# Sanity check: must end in tests/<name>/storage where <name> is
# lowercase alphanumeric. Stops `rm -rf` from ever running against
# an unexpected expansion of a callerʼs path.
if [[ ! "$path" =~ /tests/[a-z0-9]+/storage$ ]]; then
# lowercase alphanumeric (hyphens allowed so multi-word runner names
# like `webdav-drive-root` pass). Stops `rm -rf` from ever running
# against an unexpected expansion of a caller's path.
if [[ ! "$path" =~ /tests/[a-z0-9][a-z0-9-]*/storage$ ]]; then
echo "[wipe_storage] ERROR: '$path' does not match .../tests/<name>/storage — refusing to wipe" >&2
return 1
fi