Skip to content

[stable-0.1] fix(sharing): load mind maps from subfolders of public shares - #401

Merged
AndyScherzinger merged 2 commits into
stable-0.1from
backport/public-subfolder-load-stable-0.1
Oct 19, 2026
Merged

AndyScherzinger merged 2 commits into
stable-0.1from
backport/public-subfolder-load-stable-0.1

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Backport of #400 to stable-0.1. Fixes #145 for Nextcloud 32–35.

Opening a mind map from a subfolder of a public folder share failed with "Load file fail!File not found", because the public load endpoint joined the folder and the file name without a slash (/Subfolder + Test 2.km → /SubfolderTest 2.km). They are now joined with one slash. A path outside of the share gets a 404 instead of a server error, for loading and for saving.

Both commits cherry-picked without changes, including the PHPUnit tests. Tested on Nextcloud 32 and 35 with a public folder share and mind maps at three subfolder levels, plus the path traversal checks from #400: every escape attempt returns 404 for loading and saving, and nothing outside the share is read or written.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

The public load endpoint joined the folder and the file name without a
separator, so a mind map in a subfolder of a public folder share was
looked up as /Subfoldernotes.km and failed with "File not found". Join
them with a slash, as the logged-in endpoint does.

A path outside of the share made Folder::get() throw
NotPermittedException, which ended in a server error; answer it with
"File not found" too.

Fixes #145

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
(cherry picked from commit ef1105e)
@AndyScherzinger AndyScherzinger added this to the v0.1.4 milestone Oct 19, 2026
@AndyScherzinger AndyScherzinger added the bug Something isn't working label Oct 19, 2026
Saving to a path outside of a public folder share made Folder::get()
throw NotPermittedException, which ended in a server error. Nothing was
written, but answer it with "File not found" like the load endpoint.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
(cherry picked from commit 53ca29e)
@AndyScherzinger AndyScherzinger added the AI assisted This PR contains AI-assisted commits label Oct 19, 2026
@AndyScherzinger
AndyScherzinger merged commit d843d04 into stable-0.1 Oct 19, 2026
7 checks passed
@AndyScherzinger
AndyScherzinger deleted the backport/public-subfolder-load-stable-0.1 branch October 19, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant