Repository navigation
[stable-0.1] fix(sharing): load mind maps from subfolders of public shares - #401
Merged
AndyScherzinger merged 2 commits intoOct 19, 2026
Merged
Conversation
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)
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)