From 705572d40027aec4d539f5b129f1fe87d1ab3f24 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 1 Jul 2023 15:53:57 +0100 Subject: [PATCH] webdav: nextcloud: fix must use /dav/files/USER endpoint not /webdav error Before this change the regexp validating the endpoint URL was a bit too strict allowing only /dav/files/USER. This patch relaxes it allowing /dav/files/USER/dir/subdir etc. --- backend/webdav/webdav.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go index 397cd0b92..896b0b571 100644 --- a/backend/webdav/webdav.go +++ b/backend/webdav/webdav.go @@ -569,7 +569,7 @@ func (f *Fs) fetchAndSetBearerToken() error { return nil } -var validateNextCloudChunkedURL = regexp.MustCompile(`^.*/dav/files/[^/]+/?$`) +var validateNextCloudChunkedURL = regexp.MustCompile(`^.*/dav/files/`) // setQuirks adjusts the Fs for the vendor passed in func (f *Fs) setQuirks(ctx context.Context, vendor string) error {