You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Confirmations never block: the dialog plugin turns window.confirm into a Promise #168
confirm() therefore returns a Promise, and a Promise is always truthy. The frontend uses it synchronously:
if(confirm(`Delete host "${host.label}"?`)){awaithosts.deleteHost(host.id);}if(!confirm(`Remove known host "${entry.host}"?`))return;
so the destructive branch runs at once. On top of that capabilities/default.json grants no dialog:allow-confirm or dialog:allow-message, so the ACL refuses the dialog and it never appears at all. alert() messages are lost the same way.
Affected calls:
Where
What runs without asking
KeyManager.vue:131
deletes a private key from the vault; a generated key exists nowhere else
SftpBrowser.vue:286
deletes a file on the server
SftpBrowser.vue:~330
overwrites an existing file during a transfer
HostList.vue:160,180
deletes a host / a group
IdentityManager.vue:78,222
deletes a group / an identity
KnownHostsView.vue:92
forgets a pinned host key
WorkspaceView.vue:138
deletes a workspace
IdentityManager.vue (Browse)
alert() error never shown
Reproduction
The unit tests (happy-dom) and the browser harness (Chromium) both have the browser's synchronous confirm, which is why nothing caught this. Loading the plugin's exact init-iife.js into the harness after the Tauri fixture, with plugin:dialog|* refused the way the ACL refuses it:
one click on Delete host → IPC log ["plugin:dialog|confirm", "delete_host"], console error confirm not allowed. Permissions associated with this command: dialog:allow-confirm
control run without the init script → the browser shows Delete host "Orion Staging"?, Cancel → no IPC
To confirm on a packaged build: click the trash icon on any host. It disappears with no prompt.
Fix
Replace window.confirm/alert with an in-app confirmation dialog (no IPC, no permission, same look on every platform), and make the test setup and the e2e fixture reproduce the plugin's async confirm so this cannot come back unnoticed.
Activity