From 8fd64ad061c836e5baf160df611734bf00207d8a Mon Sep 17 00:00:00 2001 From: Oskar Eichler Date: Fri, 28 Aug 2026 05:19:27 +0300 Subject: [PATCH] Preserve the message and language in v3 status responses --- lib/net/sftp/protocol/03/base.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/net/sftp/protocol/03/base.rb b/lib/net/sftp/protocol/03/base.rb index bb93cd7..72e3ba5 100644 --- a/lib/net/sftp/protocol/03/base.rb +++ b/lib/net/sftp/protocol/03/base.rb @@ -18,6 +18,16 @@ def version 3 end + # Version 3 adds a message and language tag to status responses. + def parse_status_packet(packet) + data = super + unless packet.eof? + data[:message] = packet.read_string + data[:language] = packet.read_string + end + data + end + # Sends a FXP_READLINK packet to the server to request that the target of # the given symlink on the remote host (+path+) be returned. def readlink(path) @@ -32,4 +42,4 @@ def symlink(path, target) end -end; end; end; end \ No newline at end of file +end; end; end; end