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.
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-
dongcarl commented at 7:33 AM on November 17, 2018: member
-
JustinTArthur commented at 7:38 AM on November 17, 2018: contributor
ACK e7414b4a6c10ab2c17714929286f43559965607d
-
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)
- fanquake added the label Scripts and tools on Nov 17, 2018
- dongcarl force-pushed on Nov 17, 2018
-
6be7d14d24
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.
- dongcarl force-pushed on Nov 17, 2018
-
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?
- fanquake deleted a comment on Nov 17, 2018
-
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.
-
promag commented at 3:11 PM on November 19, 2018: member
ACK 6be7d14.
- laanwj merged this on Nov 21, 2018
- laanwj closed this on Nov 21, 2018
- laanwj referenced this in commit 267793af8b on Nov 21, 2018
-
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
- PastaPastaPasta referenced this in commit 10f42bffdd on Jul 19, 2020
- PastaPastaPasta referenced this in commit 9369fde159 on Jul 22, 2020
- MarcoFalke locked this on Sep 8, 2021
Contributors
Labels