settings.json overwritten if missing read permissions #22571

issue ryanofsky opened this issue on July 28, 2021
  1. ryanofsky commented at 7:20 PM on July 28, 2021: contributor

    Issue was reported by @Talkless https://github.com/bitcoin-core/gui/pull/379#issuecomment-888537173

    Happens due to this line in ReadSettings:

    https://github.com/bitcoin/bitcoin/blob/4b1fb50def0dea0cd320bc43c12d9a12edde0390/src/util/settings.cpp#L65

    which treats a nonexisting file the same as an inaccessible file. It should be changed to treat any settings file that exists and is unreadable as an error.

  2. ryanofsky added the label Bug on Jul 28, 2021
  3. tylerchambers cross-referenced this on Jul 30, 2021 from issue Util: don't overwrite existing but unreadable settings.json by tylerchambers
  4. tylerchambers cross-referenced this on Jul 30, 2021 from issue Util: error if settings json exists, but is unreadable by tylerchambers
  5. MarcoFalke referenced this in commit 91e07cc50d on Sep 5, 2021
  6. MarcoFalke closed this on Sep 5, 2021

  7. sidhujag referenced this in commit 64186eccd8 on Sep 7, 2021
  8. PastaPastaPasta referenced this in commit 8d07123fa7 on Jul 17, 2022
  9. PastaPastaPasta referenced this in commit befba8f2c3 on Aug 30, 2022
  10. PastaPastaPasta referenced this in commit 657bfaebcd on Aug 30, 2022
  11. PastaPastaPasta referenced this in commit ab4405258e on Sep 3, 2022
  12. bitcoin locked this on Sep 5, 2022

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-05-20 06:53 UTC