From dcd3dc6a779319385ff2983b108d540a0ef51064 Mon Sep 17 00:00:00 2001 From: Lukas Hirt Date: Wed, 17 Sep 2025 14:51:16 +0200 Subject: [PATCH] fix: [OCISDEV-330] add OCS v2 capabilities endpoint to public paths Following the same behavior as OCS v1, we added the OCS v2 capabilities endpoint to the public paths. --- changelog/unreleased/fix-capabilities-public-path.md | 5 +++++ services/proxy/pkg/middleware/authentication.go | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/fix-capabilities-public-path.md diff --git a/changelog/unreleased/fix-capabilities-public-path.md b/changelog/unreleased/fix-capabilities-public-path.md new file mode 100644 index 00000000000..c0cb42524f0 --- /dev/null +++ b/changelog/unreleased/fix-capabilities-public-path.md @@ -0,0 +1,5 @@ +Bugfix: Add OCS v2 capabilities endpoint to public paths + +Following the same behavior as OCS v1, we added the OCS v2 capabilities endpoint to the public paths. + +https://github.com/owncloud/ocis/pull/11665 diff --git a/services/proxy/pkg/middleware/authentication.go b/services/proxy/pkg/middleware/authentication.go index 057692402f8..c95a1f15f94 100644 --- a/services/proxy/pkg/middleware/authentication.go +++ b/services/proxy/pkg/middleware/authentication.go @@ -23,14 +23,15 @@ var ( ProxyWwwAuthenticate = []regexp.Regexp{*regexp.MustCompile("/ocs/v[12].php/cloud/")} _publicPaths = [...]string{ - "/dav/public-files/", "/remote.php/dav/ocm/", "/dav/ocm/", "/ocm/", "/remote.php/dav/public-files/", + "/dav/public-files/", "/ocs/v1.php/apps/files_sharing/api/v1/tokeninfo/unprotected", "/ocs/v2.php/apps/files_sharing/api/v1/tokeninfo/unprotected", "/ocs/v1.php/cloud/capabilities", + "/ocs/v2.php/cloud/capabilities", "/ocs/v1.php/cloud/user/signing-key", "/ocs/v2.php/cloud/user/signing-key", "/ocs/v2.php/apps/notifications/api/v1/notifications/sse",