diff options
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r-- | app/models/ci/build.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 8431c5f228c..8f64d87d635 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -251,7 +251,8 @@ module Ci def extract_coverage(text, regex) return unless regex - matches = text.scan(Regexp.new(regex)).last + regex = Gitlab::UntrustedRegexp.new(regex) + matches = regex.scan(text).last matches = matches.last if matches.is_a?(Array) coverage = matches.gsub(/\d+(\.\d+)?/).first |