diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/ftp.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index d33085331c..7aac61afe8 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -1231,6 +1231,9 @@ module Net # def status(pathname = nil) line = pathname ? "STAT #{pathname}" : "STAT" + if /[\r\n]/ =~ line + raise ArgumentError, "A line must not contain CR or LF" + end print "put: #{line}\n" if @debug_mode @sock.send(line + CRLF, Socket::MSG_OOB) return getresp |