Repository navigation
fix(files_external): reject backend changes when updating mounts - #64456
Draft
joshtrichards wants to merge 4 commits into
Draft
joshtrichards wants to merge 4 commits into
joshtrichards wants to merge 4 commits into
Conversation
joshtrichards
added this pull request to stack #64458
September 17, 2026 03:40
…anges Signed-off-by: Josh <josh.t.richards@gmail.com>
Backend changes (for example, DAV → SMB) are not currently supported or persisted by `StoragesService::updateStorage()`, but they are currently accepted. The web frontend provides some protection by disabling the backend dropdown when editing an existing mount, but the HTTP API has no equivalent safeguard. Reject backend changes before writing any mount configuration, enforcing this server-side so the behavior is consistent regardless of the caller. This prevents partially applied updates that could combine the existing backend with options intended for a different backend. Signed-off-by: Josh <josh.t.richards@gmail.com>
`StoragesService::updateStorage()` accepted updated priority values but never persisted them. As a result, changing a mount's priority appeared to succeed but was lost when the mount was reloaded. This is currently primarily a concern for the HTTP API: the web UI does not expose priority, while `files_external:import` creates new mounts and its parser does not currently import priority values (imported mounts receive the default priority). Persist priority changes passed to `updateStorage()` so updated precedence is retained for overlapping external storage mounts. Signed-off-by: Josh <josh.t.richards@gmail.com>
Will do in its own PR. Signed-off-by: Josh <josh.t.richards@gmail.com>
joshtrichards
force-pushed
the
jtr/fix-StoragesService-updates
branch
from
September 17, 2026 03:41
d455080 to
5c61b20
Compare
This branch has not been deployed
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.
Summary
Backend changes (for example, DAV-->SMB) are not currently supported or persisted by
StoragesService::updateStorage(), but they are currently accepted.The web frontend provides some protection by disabling the backend dropdown when editing an existing mount, but the HTTP API has no equivalent safeguard.
This PR rejects backend changes before writing any mount configuration, enforcing this server-side so the behavior is consistent regardless of the caller. This prevents partially applied updates that could combine the existing backend with options intended for a different backend.
First commit is all just some clarifying comments/docs covering some important bits.
Second commit is the actual fix and it's only two lines of code.
A future follow-up idea: there may be a related concern in
files_external:import.TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)