qt: askpassphrasedialog: Clear pass fields on accept #8073

pull ghost wants to merge 1 commits into bitcoin:master from changing 2 files +18 −4
  1. ghost commented at 11:56 AM on May 19, 2016: none

    This is usability improvement in a case if user gets re-asked passphrase. (e.g. made a typo)

  2. qt: askpassphrasedialog: Clear pass fields on accept
    This is usability improvement in a case if user gets re-asked
    passphrase. (e.g. made a typo)
    02ce2a3ca7
  3. jonasschnelli added the label GUI on May 19, 2016
  4. jonasschnelli commented at 6:37 PM on May 19, 2016: contributor

    Looks good. Thanks. utACK 02ce2a3ca773e2d10ff37ecf50d15c71113f3335

  5. Tyler-Hardin commented at 8:45 PM on May 19, 2016: contributor

    I kinda doubt the secure clear is useful. Wouldn't the QString that already contains the password be untouched and just deallocated?

  6. Tyler-Hardin commented at 8:55 PM on May 19, 2016: contributor

    Actually, QLineEdit::text isn't a const reference (most Qt properties are not writable), so you can zero the memory yourself. I would recommend directly zeroing the existing QString if you really want attempt to clear it securely.

  7. jonasschnelli commented at 4:02 AM on May 20, 2016: contributor

    Cleansing the memory can help. But I think there are various cases where the UI framework leaves uncleaned copies somewhere in the ram. I think the main use advantage of this PR is: https://github.com/bitcoin/bitcoin/pull/8073/files#diff-defede4762fd62a298bd8a0936cd3ed0R103 (the clear in AskPassphraseDialog::accept()).

  8. arowser commented at 8:43 AM on May 25, 2016: contributor

    Can one of the admins verify this patch?

  9. laanwj merged this on May 26, 2016
  10. laanwj closed this on May 26, 2016

  11. laanwj referenced this in commit eb2f6f72db on May 26, 2016
  12. codablock referenced this in commit 7582e6b131 on Sep 7, 2017
  13. UdjinM6 referenced this in commit 9707ca5cea on Sep 9, 2017
  14. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me