- Notifications
You must be signed in to change notification settings - Fork1k
fix: replace invalid utf-8 sequences in agent logs#13436
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This should have a regression test
MrPeacockNLB commentedJun 3, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Is it possible to backport this to stable branch? We are facing this error in production too. Coder Versionv2.10.3 |
codersdk/agentsdk/convert.go Outdated
return&proto.Log{ | ||
CreatedAt:timestamppb.New(log.CreatedAt), | ||
Output:log.Output, | ||
Output:strings.ToValidUTF8(log.Output,""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think we should probably replace invalid utf-8 with something, so it's obvious data is being deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should we get cute and replace with something like ❌ or 😞 or 🤬, or just something like<<invalid UTF-8>>
?
Signed-off-by: Spike Curtis <spike@coder.com>
Decided to just be bold and add the regression test and replacement with ❌ ---@coadler@kylecarbs revert me if you disagree. |
@MrPeacockNLB I think our policy for fixes unrelated to security is to backport to stable, which is 2.11 as of today. |
Fixes#13433.