WIP: qml: Hand payment URIs to the running instance

bitcoin-core/gui-qml: PR #988

3 minor findings

Earlier concerns neither republished nor resolved: 1 minor finding. See the Run archive for their assessments.

Findings

Link

[minor] · The shared-temp fallback trusts another account's receiver

If Qt returns an empty RuntimeLocation on non-Darwin Unix, another local account can capture and falsely acknowledge payment URIs through the predictable shared-temp socket; this trigger was not reproduced.

Location: qml/paymenturiserver.cpp:64 (head).

Details and suggested fix

ServerName() falls back to the bare BitcoinCoreApp-<hash> name, which Qt resolves under its temporary directory, normally shared /tmp. Another local account that binds this predictable name first can receive the complete batch, including addresses, amounts, labels and messages. SendRequests() writes before checking endpoint ownership and accepts one Queued byte as delivery, making the launching process exit successfully without reaching the real application. The listener's probe also trusts any answering endpoint, while UserAccessOption applies only to sockets this application creates. A valid private runtime directory avoids this fallback.

Fail closed when no private directory is available: disable listening and have the sender treat IPC as unavailable rather than connect through a shared bare name. Add a test for an empty RuntimeLocation.


Link

[minor] · Handed-over requests cancel dialogs on other wallet pages

A payment link opened in another application can cancel an in-progress fee-bump dialog because delivery checks only Send's dialogs before forcing the Send tab.

Location: qml/pages/wallet/DesktopWallets.qml:166 (head).

Details and suggested fix

DesktopWallets.canAcceptPaymentUri() delegates only to sendPage.canAcceptPaymentRequest(), even when Activity, Receive or wallet settings is current. Delivery then calls showWalletTab(WalletView.Send). Hiding Activity invokes WalletView.pageHidden() and recursively closes its owned popups. In the transaction detail view, this closes SpeedUpOverlay, whose onClosed handler resets the bump model. The gate also omits shell-owned dialogs such as the migration passphrase prompt. Hand-off makes this reachable during normal interaction whenever another process queues a payment link, rather than mainly during startup.

Keep requests queued while unrelated dialogs own the UI, announce them through a non-modal waiting indicator, and retry after those dialogs close or the user selects Send. Add a routing test that delivers a request while the speed-up overlay is open and verifies that the overlay and its bump state remain intact.


Link

[minor] · PSBT import leaves a payment review that consumes its request without applying it

A successful PSBT import during an incoming payment review clears the pending request but leaves its dialog open, so Apply subsequently removes the queued request without filling the form.

Location: qml/pages/wallet/SendCreate.qml:146 (head).

Details and suggested fix

canAcceptPaymentRequest() omits psbtOpenDialog, whose asynchronous QFileDialog::open() leaves socket delivery running while the chooser is open. Conversely, openPsbtFileImport() lacks the guard used by openPaymentRequestImport() when a payment review is visible. Accepting a supported PSBT calls m_send_recipients->clear(), which emits currentRecipientChanged. That handler clears m_pendingPastedPaymentRequest without closing or interrupting the payment review, and the import opens the transaction review. After that review closes, Apply on the stale payment dialog finds a null result, applies nothing and still reports resolved, causing MainWindow to dequeue the request.

Make PSBT selection and payment review mutually exclusive: include the chooser in the delivery gate, retry delivery when it closes, and guard PSBT opening while a payment review owns the form. Recipient replacement should also interrupt and close any outstanding payment review so its request remains queued. Cover successful PSBT import with a request arriving during selection.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.