fix: check value length

This commit is contained in:
Jason Song 2023-04-20 23:10:35 +08:00
parent 2477e8b82a
commit bf1d367b7c
No known key found for this signature in database
GPG key ID: 8402EEEE4511A8B5

View file

@ -181,6 +181,10 @@ func (r *Reporter) SetOutputs(outputs map[string]string) {
r.logf("ignore output because the key is too long: %q", k)
continue
}
if l := len(v); l > 1024*1024 {
log.Println("ignore output because the value is too long:", k, l)
r.logf("ignore output because the value %q is too long: %d", k, l)
}
if _, ok := r.outputs.Load(k); ok {
continue
}