Page MenuHomePhabricator

Properly generate salt in rpcauth.py, update tests
ClosedPublic

Authored by Fabien on Jul 31 2019, 08:25.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable