Skip to content

fix(share): use public DAV endpoint v2 for retrieving page content#2292

Merged
mejo- merged 3 commits intomainfrom
fix/public_dav_v2
Feb 26, 2026
Merged

fix(share): use public DAV endpoint v2 for retrieving page content#2292
mejo- merged 3 commits intomainfrom
fix/public_dav_v2

Conversation

@mejo-
Copy link
Member

@mejo- mejo- commented Feb 24, 2026

On some instances, the old public DAV endpoint (/public.php/webdav/...) returns 404 for some reason. The new public DAV endpoint v2 (/public.php/dav/files/<shareToken/...) works as expected.

The files_sharing app uses the new v2 endpoint, so let's use it as well.

Fixes: #2257

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

@mejo- mejo- self-assigned this Feb 24, 2026
@mejo- mejo- added bug Something isn't working 3. to review labels Feb 24, 2026
@mejo-
Copy link
Member Author

mejo- commented Feb 24, 2026

We should also notify people in #1530 after this PR got released, that for those who still experienced the problem, it might be finally solved with the latest release.

christianlupus
christianlupus previously approved these changes Feb 25, 2026
Copy link

@christianlupus christianlupus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested on my instance and it solved the issue for me. @mejo- tested on my instance with this patch cherry-pick-ed successfully.

@christianlupus christianlupus dismissed their stale review February 25, 2026 09:26

No maintainer and mo overview over possible side effects

Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting to the root cause of this!

@max-nextcloud
Copy link
Collaborator

max-nextcloud commented Feb 25, 2026

Cypress failures seem related though.
Page share with password protection -- Allows opening a password-protected shared (non-editable) page (failed)

I suspect the trim is here:

// or when page is empty
|| !this.davContent.trim()) {
this.setTextEdit()

and for some reason the url does not return any responseText in some cases:

const content = await axios.get(davUrl, axiosConfig)
// content.data will attempt to parse as json, but we want the raw text.
return content.request.responseText

@mejo-
Copy link
Member Author

mejo- commented Feb 25, 2026

The problem is that this change breaks getting the content of the page in password-protected shares. I'm currently looking into it.

On some instances, the old public DAV endpoint (`/public.php/webdav/...`)
returns 404 for some reason. The new public DAV endpoint v2
(`/public.php/dav/files/<shareToken/...`) works as expected.

The files_sharing app uses the new v2 endpoint, so let's use it as well.

Fixes: #2257

Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- force-pushed the fix/public_dav_v2 branch from eed3eb8 to 59f4ea9 Compare February 25, 2026 12:05
@mejo-
Copy link
Member Author

mejo- commented Feb 25, 2026

The problem is that this change breaks getting the content of the page in password-protected shares. I'm currently looking into it.

@max-nextcloud and me found the problem. The PR is ready for review again ☺️

@mejo- mejo- requested a review from max-nextcloud February 25, 2026 14:11
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- force-pushed the fix/public_dav_v2 branch from 59f4ea9 to 34fc771 Compare February 26, 2026 10:58
@mejo- mejo- merged commit 050d3d1 into main Feb 26, 2026
95 of 105 checks passed
@mejo- mejo- deleted the fix/public_dav_v2 branch February 26, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Public sharing is broken

3 participants