diff options
Diffstat (limited to 'lib/net/ftp.rb')
-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 5b63764625..c9b80c6804 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -280,6 +280,9 @@ module Net if @debug_mode print "put: ", sanitize(line), "\n" end + if /[\r\n]/ =~ line + raise ArgumentError, "A line must not contain CR or LF" + end line = line + CRLF @sock.write(line) end |