diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-28 22:03:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-28 22:03:28 +0000 |
commit | 6ed97cad88c8518155867b9a6a7896d7085a2f4e (patch) | |
tree | 48e63792d3ca6f832099e38163ed7b6388d88218 /lib/gitlab/ci | |
parent | cda92b051261cb820ed3ea9683865aeb85890411 (diff) | |
download | gitlab-ce-6ed97cad88c8518155867b9a6a7896d7085a2f4e.tar.gz |
Add latest changes from gitlab-org/security/gitlab@15-4-stable-ee
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r-- | lib/gitlab/ci/ansi2json/line.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/ci/ansi2json/line.rb b/lib/gitlab/ci/ansi2json/line.rb index e48080993ab..abe2f272ca7 100644 --- a/lib/gitlab/ci/ansi2json/line.rb +++ b/lib/gitlab/ci/ansi2json/line.rb @@ -80,7 +80,8 @@ module Gitlab end def set_section_duration(duration_in_seconds) - duration = ActiveSupport::Duration.build(duration_in_seconds.to_i) + normalized_duration_in_seconds = duration_in_seconds.to_i.clamp(0, 1.year) + duration = ActiveSupport::Duration.build(normalized_duration_in_seconds) hours = duration.in_hours.floor hours = hours > 0 ? "%02d" % hours : nil minutes = "%02d" % duration.parts[:minutes].to_i |