Page MenuHomePhabricator

Properly generate salt in rpcauth.py, update tests
ClosedPublic

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

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABCa8b8600adee7: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Wed, Jul 31, 08:25
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Jul 31, 08:25
deadalnix accepted this revision.Thu, Aug 1, 06:18
This revision is now accepted and ready to land.Thu, Aug 1, 06:18
This revision was automatically updated to reflect the committed changes.