mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-07 07:40:29 +00:00
Sanitize UFT-8 content in logs (#453)
I accidently closed my previous PR #384 This PR replaces invalid UTF-8 character in a stream with `?` character. On Windows Server 2019 other characters are replaced by `?` as well so it's consistent. fixes #452 Co-authored-by: Lunny Xiao <[email protected]> Reviewed-on: https://gitea.com/gitea/act_runner/pulls/453 Reviewed-by: Lunny Xiao <[email protected]> Reviewed-by: Jason Song <[email protected]> Co-authored-by: hakito <[email protected]> Co-committed-by: hakito <[email protected]>
This commit is contained in:
1 parent
8c8a8ce401
commit
daf52d0e62
2 files changed
+2
-2
No files matched your search
@@ -418,7 +418,7 @@ func (r *Reporter) parseLogRow(entry *log.Entry) *runnerv1.LogRow {
|
||||
|
||||
return &runnerv1.LogRow{
|
||||
Time: timestamppb.New(entry.Time),
|
||||
Content: content,
|
||||
Content: strings.ToValidUTF8(content, "?"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user