mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/smtp.rb (send0): do taint check only when $SAFE > 0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
42f3ae0286
commit
f1d9d32a67
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Jul 29 22:36:50 2003 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* lib/net/smtp.rb (send0): do taint check only when $SAFE > 0
|
||||
|
||||
Tue Jul 29 19:20:34 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* lib/fileutils.rb (install): support preserve timestamp.
|
||||
|
|
|
@ -490,9 +490,11 @@ module Net
|
|||
def send0( from_addr, to_addrs )
|
||||
raise IOError, 'closed session' unless @socket
|
||||
raise ArgumentError, 'mail destination does not given' if to_addrs.empty?
|
||||
raise SecurityError, 'tainted from_addr' if from_addr.tainted?
|
||||
to_addrs.each do |to|
|
||||
raise SecurityError, 'tainted to_addr' if to.tainted?
|
||||
if $SAFE > 0
|
||||
raise SecurityError, 'tainted from_addr' if from_addr.tainted?
|
||||
to_addrs.each do |to|
|
||||
raise SecurityError, 'tainted to_addr' if to.tainted?
|
||||
end
|
||||
end
|
||||
|
||||
mailfrom from_addr
|
||||
|
|
Loading…
Reference in a new issue