Skip to content

Commit 9463b82

Browse files
sanitise logging input
1 parent 7396328 commit 9463b82

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

module/util/log.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ func NewLogProgressConfig[T int | uint | int32 | uint32 | uint64 | int64](
6868
ticks = uint64(total + 1)
6969
}
7070

71+
// sanitize noDataLogDuration
72+
if noDataLogDuration < time.Millisecond {
73+
noDataLogDuration = time.Millisecond
74+
}
75+
7176
return LogProgressConfig[T]{
7277
message: message,
7378
total: total,

0 commit comments

Comments
 (0)