fix: surface commands that are unreachable due to missing permissions - #15941
Open
gronke wants to merge 3 commits into
Open
fix: surface commands that are unreachable due to missing permissions#15941gronke wants to merge 3 commits into
gronke wants to merge 3 commits into
Conversation
The ACL rejection was only visible in the webview's rejected promise, which frontends routinely swallow. The same message now goes to log::error!.
…any permission A command listed in generate_handler! but missing from the plugin's COMMANDS list (or any hand-written permission) is silently unreachable: no permission exists, so no capability can grant it. generate_handler! now prints a warning naming the command. Fail-open: crates without defined permissions stay silent, and the REMOVE_UNUSED_COMMANDS flow is unchanged.
Contributor
Package Changes Through c0fd20aThere are 14 changes which include tauri with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-build with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, tauri-bundler with minor, tauri-macos-sign with minor, @tauri-apps/api with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin with minor, tauri-driver with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
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.
A command listed in
generate_handler!but missing from the plugin'sCOMMANDSbuild-script list is silently unreachable: no permission is generated, so no capability can grant it, and every invoke is rejected at runtime with nothing on the host side.Two changes:
generate_handler!prints a build-time warning when a registered command is not referenced by any permission of the crate (pluginCOMMANDSor hand-written permission files). Fail-open: crates without defined permissions stay silent,REMOVE_UNUSED_COMMANDSflow unchanged, renamed commands called out in the message. Probes the permission-file lists written by tauri-plugin (external plugins), tauri-build (inlined plugins, app manifest) and the tauri crate (core plugins).log::error!(richresolve_access_messagein debug builds, short message in release); previously the reason lived only in the webview's rejected promise, which frontends routinely swallow.Closes #15940