Merge pull request #10799 from SomberNight/202608_android_secure_window
What changed, and why it matters
This update tightens a privacy feature on Electrum's Android app that prevents the screen from being captured while sensitive Bitcoin private keys or seed phrases are visible. Before, the protection could be accidentally turned off when multiple wallet windows overlapped, potentially letting malware or a malicious screenshot grab secret key material. The fix makes sure protection stays active whenever any sensitive screen is actually visible.
Treat as a low-to-moderate privacy hardening patch. Users on Android should update to a release containing this commit to reduce the risk of private keys or seeds being captured in screenshots or recent-apps thumbnails. No immediate emergency response is warranted.
Security signals we found
Adds visibility-gated secureWindow bindings to protect WIF keys and seed phrases
Prevents secureWindow from being cleared when multiple sensitive dialogs are stacked
Targets Android screenshot/recents-thumbnail protection surface
No cryptographic or input validation changes; purely UI window-flag hardening
Evidence from the diff
The commit adds when: root.visible (or equivalent) conditions to QML Binding elements that set AppController.secureWindow. This property is used on Android to flag windows that should be protected from screenshots/recents thumbnails via FLAG_SECURE. Previously, overlapping secure dialogs could disable the flag because later bindings evaluated to false even though another secure dialog was still visible. The change ensures secureWindow remains true while any protected component is visible, enabling correct stacking behavior.
Changed components
electrum/gui/qml/components/AddressDetails.qmlelectrum/gui/qml/components/ImportAddressesKeysDialog.qmlelectrum/gui/qml/components/SweepDialog.qmlelectrum/gui/qml/components/WalletDetails.qmlelectrum/gui/qml/components/wizard/Wizard.qmlInspect captured patch +17 / −0
### electrum/gui/qml/components/AddressDetails.qml
@@ -351,6 +351,7 @@ Pane {
Binding {
target: AppController
property: 'secureWindow'
+ when: root.visible // enables stacking multiple secureWindow dialogs
value: Boolean(addressdetails.privkey)
}
}
### electrum/gui/qml/components/ImportAddressesKeysDialog.qml
@@ -123,4 +123,11 @@ ElDialog {
id: bitcoin
}
+ Binding {
+ target: AppController
+ property: 'secureWindow'
+ when: root.visible // enables stacking multiple secureWindow dialogs
+ value: true
+ }
+
}
### electrum/gui/qml/components/SweepDialog.qml
@@ -162,4 +162,11 @@ ElDialog {
Bitcoin {
id: bitcoin
}
+
+ Binding {
+ target: AppController
+ property: 'secureWindow'
+ when: root.visible // enables stacking multiple secureWindow dialogs
+ value: true
+ }
}
### electrum/gui/qml/components/WalletDetails.qml
@@ -677,6 +677,7 @@ Pane {
Binding {
target: AppController
property: 'secureWindow'
+ when: rootItem.visible // enables stacking multiple secureWindow dialogs
value: seedText.visible
}
### electrum/gui/qml/components/wizard/Wizard.qml
@@ -155,6 +155,7 @@ ElDialog {
Binding {
target: AppController
property: 'secureWindow'
+ when: pages.visible // enables stacking multiple secureWindow dialogs
value: pages.contentChildren[pages.currentIndex].securePage
}
}Why this scored 41/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.