HomePhabricator

Properly generate salt in rpcauth.py, update tests

Description

Properly generate salt in rpcauth.py, update tests

Summary:

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.

Backport of core PR14742
https://github.com/bitcoin/bitcoin/pull/14742/files

Depends on D3780.

Test Plan:

make check

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D3781

Details

Provenance
Carl Dong <accounts@carldong.me>Authored on Nov 17 2018, 07:24
FabienCommitted on Aug 5 2019, 07:13
FabienPushed on Aug 5 2019, 07:30
Reviewer
Restricted Project
Differential Revision
D3781: Properly generate salt in rpcauth.py, update tests
Parents
rSTAGINGee0927c5d46f: rpcauth: Make it possible to provide a custom password
Branches
Unknown
Tags
Unknown