mirror of
				https://gitea.com/gitea/act_runner.git
				synced 2025-10-31 04:47:58 +01: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 <xiaolunwen@gmail.com> Reviewed-on: https://gitea.com/gitea/act_runner/pulls/453 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: Jason Song <i@wolfogre.com> Co-authored-by: hakito <hakito@noreply.gitea.com> Co-committed-by: hakito <hakito@noreply.gitea.com>
This commit is contained in:
		| @@ -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