mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
scp, ssh commands: hide the real fs path on errors
The underlying filesystem errors for permissions and non-existing files can contain the real storage path. Map these errors to more generic ones to avoid to leak this info Fixes #109
This commit is contained in:
@@ -1195,6 +1195,7 @@ func TestSCPParseUploadMessage(t *testing.T) {
|
||||
}
|
||||
connection := Connection{
|
||||
channel: &mockSSHChannel,
|
||||
fs: vfs.NewOsFs("", os.TempDir(), nil),
|
||||
}
|
||||
scpCommand := scpCommand{
|
||||
sshCommand: sshCommand{
|
||||
@@ -1632,6 +1633,7 @@ func TestSCPUploadFiledata(t *testing.T) {
|
||||
},
|
||||
protocol: protocolSCP,
|
||||
channel: &mockSSHChannel,
|
||||
fs: vfs.NewOsFs("", os.TempDir(), nil),
|
||||
}
|
||||
scpCommand := scpCommand{
|
||||
sshCommand: sshCommand{
|
||||
|
||||
Reference in New Issue
Block a user