summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-06-22 15:33:17 +0000
committerMike Greiling <mike@pixelcog.com>2017-07-19 22:28:41 -0500
commitba60d4f6e4f3a6d3cb56c9320f475bee8f0b38da (patch)
tree51245b9a3f7df6df3e396f3335f88d79f5d2f328 /lib/gitlab/ci
parentceda6bd5a6d5e7b24f0ec003ce2e7b446d0917c0 (diff)
downloadgitlab-ce-ba60d4f6e4f3a6d3cb56c9320f475bee8f0b38da.tar.gz
Merge branch '24570-use-re2-for-user-supplied-regexp-9-3' into 'security-9-3'
24570 use re2 for user supplied regexp 9 3 See merge request !2129
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r--lib/gitlab/ci/trace/stream.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/ci/trace/stream.rb b/lib/gitlab/ci/trace/stream.rb
index c4c0623df6c..5d6977106d6 100644
--- a/lib/gitlab/ci/trace/stream.rb
+++ b/lib/gitlab/ci/trace/stream.rb
@@ -69,12 +69,12 @@ module Gitlab
return unless valid?
return unless regex
- regex = Regexp.new(regex)
+ regex = Gitlab::UntrustedRegexp.new(regex)
match = ""
reverse_line do |line|
- matches = line.scan(regex)
+ matches = regex.scan(line)
next unless matches.is_a?(Array)
next if matches.empty?