Repository navigation
fix(api): skip the space root when the server unescapes its href - #330
Merged
Merged
Conversation
OpenCloud echoes the requested collection unescaped while the request URL percent-encodes the space id, so the root was listed as a folder named after the id. Compare decoded hrefs before skipping it.
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.
The remote folder picker introduced in 0.44.8 reads the chosen space and filters its root by comparing
entry.href_pathwith the request path. OpenCloud echoes the href unescaped (...$...!...) while the request carried%24/%21, so the comparison failed and the root became a folder named after the space id.Reproduced against OpenCloud 8.1 with a real account:
folders[Ana Xu] = ["/7d443b01-...$4767cb24-..."],folders[2026] = [..., "/a0ca6a90-...!7d443b01-..."]folders[Ana Xu] = [],folders[2026] = ["/2026 Bender", "/2026 Domatix", "/2026 Odooers", "/Fras Ptes", "/IRPF"]Both sides are percent-decoded and the trailing slash dropped before the comparison, which also covers a Nextcloud login escaped as
%40in the URL.Test added (red before the change, green after):
space_folders_skip_the_root_although_the_server_unescapes_the_href. Gates: 784 tests (0 failed, 3 ignored),cargo clippy --all-targets -- -D warnings,cargo fmt --check.Closes #329