Properly generate salt in rpcauth.py #14742

pull dongcarl wants to merge 1 commits into bitcoin:master from dongcarl:2018-11-fix-rpcauth-salt changing 2 files +9 −12
  1. dongcarl commented at 7:33 AM on November 17, 2018: member

    Previously, when iterating over bytes of the generated salt to construct a hex string, only one character would be outputted when the byte is less than 0x10. Meaning that for a 16 byte salt, the hex string might be less than 32 characters and collisions would occur.

  2. JustinTArthur commented at 7:38 AM on November 17, 2018: contributor

    ACK e7414b4a6c10ab2c17714929286f43559965607d

  3. luke-jr commented at 7:48 AM on November 17, 2018: member

    Apparently this requires Python 3.6, whereas we support Python 3.4 (held back for RHEL I guess)

  4. fanquake added the label Scripts and tools on Nov 17, 2018
  5. dongcarl force-pushed on Nov 17, 2018
  6. Properly generate salt in rpcauth.py, update tests
    Previously, when iterating over bytes of the generated salt to construct
    a hex string, only one character would be outputted when the byte is
    less than 0x10. Meaning that for a 16 byte salt, the hex string might be
    less than 32 characters and collisions would occur.
    6be7d14d24
  7. dongcarl force-pushed on Nov 17, 2018
  8. dongcarl commented at 11:41 AM on November 17, 2018: member

    Fixed, works with Python 3.4 now. Does anyone know if we have integration tests that use this?

  9. fanquake deleted a comment on Nov 17, 2018
  10. promag commented at 12:39 PM on November 19, 2018: member

    Fixed, works with Python 3.4 now. Does anyone know if we have integration tests that use this?

    I don't think so.

  11. promag commented at 3:11 PM on November 19, 2018: member

    ACK 6be7d14.

  12. laanwj merged this on Nov 21, 2018
  13. laanwj closed this on Nov 21, 2018

  14. laanwj referenced this in commit 267793af8b on Nov 21, 2018
  15. jnewbery commented at 8:37 PM on November 21, 2018: member

    Does anyone know if we have integration tests that use this?

    Do you mean that use rpcauth.py? Yes: https://github.com/bitcoin/bitcoin/blob/d7b0258ff037ae90f60a86fc68cb55069c96e8d0/test/functional/rpc_users.py#L40

  16. PastaPastaPasta referenced this in commit 10f42bffdd on Jul 19, 2020
  17. PastaPastaPasta referenced this in commit 9369fde159 on Jul 22, 2020
  18. MarcoFalke 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-22 00:14 UTC

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