Skip to content

qml/android: protect WIF keys from screenshots in more places - #10799

Merged
accumulator merged 1 commit into
spesmilo:masterfrom
SomberNight:202608_android_secure_window
Aug 7, 2026
Merged

qml/android: protect WIF keys from screenshots in more places#10799
accumulator merged 1 commit into
spesmilo:masterfrom
SomberNight:202608_android_secure_window

Conversation

@SomberNight

Copy link
Copy Markdown
Member

also fix bug in AddressDetails where we were never unsetting the secure flag

Comment thread electrum/gui/qml/components/ImportAddressesKeysDialog.qml
@SomberNight
SomberNight force-pushed the 202608_android_secure_window branch 2 times, most recently from 241dccd to 65aae21 Compare August 5, 2026 15:10
property: 'secureWindow'
value: seedText.visible
when: rootItem.visible // enables stacking multiple secureWindow dialogs
value: true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now this page will always be 'secured', even when no secrets are shown?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also fix bug in AddressDetails where we were never unsetting the secure flag

notes re dialog stacking:
- if we stack two "secure" dialogs and then pop one of them, the remaining "secure" dialog should still have secureWindow == true.
  - we could either impl some refcounting for the number of alive "secure" dialogs
  - or perhaps simpler but less robust, qml binding magic using the "when" as done here might work?
    - ref https://doc.qt.io/qt-6/qml-qtqml-binding.html#restoreMode-prop
    - the default restoreMode (Binding.RestoreBindingOrValue) seems to do what we want here
      - I don't explicitly set it as the Qt docs have this note:
        > Note: This property exists for backwards compatibility with earlier versions of Qt. Don't use it in new code.
    - seems to work on my phone
@SomberNight
SomberNight force-pushed the 202608_android_secure_window branch from 65aae21 to 739cba5 Compare August 7, 2026 09:51
@accumulator
accumulator merged commit 4622390 into spesmilo:master Aug 7, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants