diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/find.rb | 3 | ||||
-rw-r--r-- | lib/net/telnet.rb | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/find.rb b/lib/find.rb index 9ca39cabc..e94d5c2c7 100644 --- a/lib/find.rb +++ b/lib/find.rb @@ -36,7 +36,8 @@ module Find paths.collect!{|d| d.dup} while file = paths.shift catch(:prune) do - yield file + yield file.dup + file.untaint begin if File.lstat(file).directory? then d = Dir.open(file) diff --git a/lib/net/telnet.rb b/lib/net/telnet.rb index 095be4533..6e50d1757 100644 --- a/lib/net/telnet.rb +++ b/lib/net/telnet.rb @@ -706,7 +706,7 @@ module Net # :nodoc: end if block_given? - line = waitfor(/login[: ]*\z/n){|c| yield c } + line = waitfor(/[Ll]ogin[: ]*\z/n){|c| yield c } if password line += cmd({"String" => username, "Match" => /Password[: ]*\z/n}){|c| yield c } @@ -715,7 +715,7 @@ module Net # :nodoc: line += cmd(username){|c| yield c } end else - line = waitfor(/login[: ]*\z/n) + line = waitfor(/[Ll]ogin[: ]*\z/n) if password line += cmd({"String" => username, "Match" => /Password[: ]*\z/n}) |