Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not log yamux buffers without sanitization (trace log level) #1046

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

etan-status
Copy link
Contributor

The Msg Rcv trace log does not sanitize the buffer against binary data, which may trigger oddities in the terminal displaying it, as binary control characters get interpreted. Using shortLog instead is consistent with Mplex and displays the start and end as hex. It makes more sense anyway because the exchanged messages actually do contain binary headers very often, and displaying these as string is most likely incorrect.

The `Msg Rcv` trace log does not sanitize the buffer against binary
data, which may trigger oddities in the terminal displaying it, as
binary control characters get interpreted. Using `shortLog` instead
is consistent with `Mplex` and displays the start and end as hex.
It makes more sense anyway because the exchanged messages actually do
contain binary headers very often, and displaying these as string is
most likely incorrect.
Copy link

codecov bot commented Mar 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.80%. Comparing base (6c87348) to head (b66a1c3).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           unstable    #1046      +/-   ##
============================================
+ Coverage     82.77%   82.80%   +0.03%     
============================================
  Files            91       91              
  Lines         15604    15604              
============================================
+ Hits          12916    12921       +5     
+ Misses         2688     2683       -5     
Files Coverage Δ
libp2p/muxers/yamux/yamux.nim 88.34% <100.00%> (ø)

... and 3 files with indirect coverage changes

@etan-status etan-status merged commit d43c5fe into unstable Mar 3, 2024
11 checks passed
@etan-status etan-status deleted the dev/etan/ym-sanitizelog branch March 3, 2024 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: done
Development

Successfully merging this pull request may close these issues.

2 participants