diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-05-09 07:01:20 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-05-09 07:01:26 +0200 |
commit | 5925f1e652768a9502831b9ccf78d16cf3c37d29 (patch) | |
tree | 054b67cdf7a917fe6bd558879449eab1b9246950 /doc | |
parent | 8d5a0583c497a67baa3db25fc4b359cf76685d83 (diff) | |
parent | 09205b33aa74e385caa2803aa6febc18ad1efa32 (diff) |
Merge bitcoin/bitcoin#21872: net: Sanitize message type for logging
09205b33aa74e385caa2803aa6febc18ad1efa32 net: Clarify message header validation errors (W. J. van der Laan)
955eee76803c098978cf0bbc7f1f6d3c230544e2 net: Sanitize message type for logging (W. J. van der Laan)
Pull request description:
- Use `SanitizeString` when logging message errors to make sure that the message type is sanitized. I have checked all logging in `net.cpp`.
- For the `MESSAGESTART` error don't inspect and log header details at all: receiving invalid start bytes makes it likely that the packet isn't even formatted as valid P2P message. Logging the four unexpected start bytes (as hex) should be enough.
- Update `p2p_invalid_messages.py` test to check this.
- Improve error messages in a second commit.
Issue reported by gmaxwell.
ACKs for top commit:
MarcoFalke:
re-ACK 09205b33aa74e385caa2803aa6febc18ad1efa32 only change is log message fixup 🔂
practicalswift:
re-ACK 09205b33aa74e385caa2803aa6febc18ad1efa32
Tree-SHA512: 8fe5326af135cfcf39ea953d9074a8c966b9b85a810b06a2c45b8a745cf115de4f321e72fc769709d6bbecfc5953aab83176db6735b04c0bc6796f59272cadce
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions