Skip to content

Commit 4328983

Browse files
committed
fix: replace invalid utf-8 sequences in agent logs
Fixes #13433.
1 parent b723da9 commit 4328983

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codersdk/agentsdk/convert.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ func ProtoFromLog(log Log) (*proto.Log, error) {
348348
}
349349
return &proto.Log{
350350
CreatedAt: timestamppb.New(log.CreatedAt),
351-
Output: log.Output,
351+
Output: strings.ToValidUTF8(log.Output, ""),
352352
Level: proto.Log_Level(lvl),
353353
}, nil
354354
}

0 commit comments

Comments
 (0)