summaryrefslogtreecommitdiff
path: root/lib/resolv.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-20 04:25:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-20 04:25:01 +0000
commitcdf1b85ae79cd4fe3995a72b6b861d8eb2a9d664 (patch)
tree1c82a34ed101c31b778fd36378e24690c0505e4f /lib/resolv.rb
parentc08e8886badd47890a54bdc54f1c09de7ad5c8e8 (diff)
Fixed command Injection
* lib/resolv.rb (Resolv::Config.parse_resolv_conf): fixed potential command injection by use of Kernel#open. [ruby-core:84347] [Bug #14205] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/resolv.rb')
-rw-r--r--lib/resolv.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/resolv.rb b/lib/resolv.rb
index 56183b837d..48ee400efe 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -928,7 +928,7 @@ class Resolv
nameserver = []
search = nil
ndots = 1
- open(filename, 'rb') {|f|
+ File.open(filename, 'rb') {|f|
f.each {|line|
line.sub!(/[#;].*/, '')
keyword, *args = line.split(/\s+/)