diff options
Diffstat (limited to 'lib/net/ftp.rb')
-rw-r--r-- | lib/net/ftp.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 75e087a20c..fdd1b5ffa9 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -69,7 +69,16 @@ module Net voidresp end end - + + def set_socket(sock, get_greeting = true) + synchronize do + @sock = sock + if get_greeting + voidresp + end + end + end + def sanitize(s) if s =~ /^PASS /i return s[0, 5] + "*" * (s.length - 5) |