HomePhabricator

Fix localhost typo in addresses directed at addnode rpc

Description

Fix localhost typo in addresses directed at addnode rpc

Summary:
addnode has no input validation so will accept garbage inputs but fail later
in the network stack. This case just happens to work since the network code
interprets 127.0.01 as 127.0.0.1. But it's obviously wrong and makes the logs
look incorrect so it is worth fixing. There is no change in behavior.

Bitcoin Core is aware that addnode needs improvements. Since the impact of lack
of validation is low, we can either wait until a backport is available or fix
the root cause as resourcing allows.

Test Plan:

./test/functional/test_runner.py abc_p2p_*

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
sdulfariAuthored on Oct 6 2022, 17:32
sdulfariPushed on Oct 10 2022, 17:13
Reviewer
Restricted Project
Differential Revision
D12167: Fix localhost typo in addresses directed at addnode rpc
Parents
rABC79177102e678: Refactor ProcessNewBlock calls to reduce code duplication and take a CBlockā€¦
Branches
Unknown
Tags
Unknown