Skip to content

/dav/files/<user>/ returns 500 on OPTIONS and the paths below it resolve into a different namespace #5767

Description

@btwshivam

Two things are wrong with this route

OPTIONS returns 500, so WebDAV clients can't mount it:

Image Image

files branch in dav.go calls GetHome unconditionally but the auth
middleware lets OPTIONS through before authenticating.. so there is no user in the
context and GetHome comes back Unauthenticated.

root and the paths below it end up in different providers. GetHome is only
joined for the root.. everything else returns early into FilesHandler, which uses
files_namespace and no longer has the username since applyLayout returns the
namespace unchanged.

Image

soo the folder is created and then it is not in the listing of the home it was
created in

Since the username is dropped every user lands on the same path. marie has never
created anything here:

Image

last part is on localfs which is permissive. On EOS the driver impersonates the
end user so the ACLs would likely deny the read, but the routing is wrong either way :)

setup is a single revad with files_namespace = "/users" and
webdav_namespace = "/home", same as tests/revad/frontend.toml

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions