Skip to content

Commit 2b706f2

Browse files
committed
Land rapid7#4648, YAML parsing fix
Prefer regex. For reasons...
2 parents bf39a7a + a88a631 commit 2b706f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/post/multi/gather/rubygems_api_key.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def run
4848
# one anyway.
4949
def extract_key(path)
5050
data = read_file(path)
51-
keys = data.split(":").strip.select {|k| k =~ /[0-9a-f]{32}/ }
52-
keys.first
51+
keys = data.split(':').select { |k| k =~ /[0-9a-f]{32}/ }
52+
keys.first.strip
5353
end
5454

5555
def download_key(paths)

0 commit comments

Comments
 (0)