diff options
author | W. J. van der Laan <laanwj@protonmail.com> | 2021-05-06 17:25:17 +0200 |
---|---|---|
committer | W. J. van der Laan <laanwj@protonmail.com> | 2021-05-06 17:30:52 +0200 |
commit | 955eee76803c098978cf0bbc7f1f6d3c230544e2 (patch) | |
tree | 43972207a367ea0b51cd416ff94ab9c315a24071 /src/addrman.h | |
parent | 9c05da4a5c57d7fd0fc53817ad6f0a07c0f08b5b (diff) |
net: Sanitize message type for logging
- Use `SanitizeString` when logging message errors to make sure that the
message type is sanitized.
- 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 should be enough.
- Update `p2p_invalid_messages.py` test to check this.
Issue reported by gmaxwell.
Diffstat (limited to 'src/addrman.h')
0 files changed, 0 insertions, 0 deletions