server icon indicating copy to clipboard operation
server copied to clipboard

Public dav endpoint v2

Open skjnldsv opened this issue 2 years ago • 2 comments

Fix #19700

Implements a new v2 endpoint which also allows GET

$ curl -k https://dev.domain.com/public.php/dav/files/Y9Hc4SPqg564gid -X PROPFIND
$ curl -k https://dev.domain.com/public.php/dav/files/Y9Hc4SPqg564gid/video.mp4 -X PROPFIND

Access a file directly

$ curl -k https://dev.domain.com/public.php/dav/files/Y9Hc4SPqg564gid/video.mp4 -X GET

If password-protected

$ curl -k -u 'anonymous:password' https://dev.domain.com/public.php/dav/files/Y9Hc4SPqg564gid
  • [x] GET access to direct files
  • [x] Bruteforce protected
  • [x] Once authenticated (with share password), no need to send basic auth again

@nextcloud/server-backend any thoughts?

skjnldsv avatar May 15 '22 09:05 skjnldsv

@skjnldsv what happens if you still send basic auth for "https://dev.domain.com/public.php/dav/files/Y9Hc4SPqg564gid" ? will it then try to look for a folder "Y9Hc4SPqg564gid" inside the share ? just to double check that there is no conflict/confusion happening between both approaches

PVince81 avatar May 17 '22 08:05 PVince81

@skjnldsv what happens if you still send basic auth for "dev.domain.com/public.php/dav/files/Y9Hc4SPqg564gid" ? will it then try to look for a folder "Y9Hc4SPqg564gid" inside the share ? just to double check that there is no conflict/confusion happening between both approaches

It will ignore the username. Basic auth is only used to authenticate on protected shares now

skjnldsv avatar May 17 '22 08:05 skjnldsv

Finally all green! Ok everyone, this is ready for revew! This will be a great enhancement for 29! Also includes proper phpunit testing! :rocket:

skjnldsv avatar Dec 29 '23 08:12 skjnldsv