mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
sftpd: explicitly configure supported SFTP extensions
update pkg/sftp to a git revision that includes the needed patch https://github.com/pkg/sftp/pull/315
This commit is contained in:
@@ -802,3 +802,18 @@ func TestConnectionStatusStruct(t *testing.T) {
|
||||
t.Errorf("error getting connection info")
|
||||
}
|
||||
}
|
||||
|
||||
func TestSFTPExtensions(t *testing.T) {
|
||||
initialSFTPExtensions := sftpExtensions
|
||||
c := Configuration{}
|
||||
err := c.configureSFTPExtensions()
|
||||
if err != nil {
|
||||
t.Errorf("error configuring SFTP extensions")
|
||||
}
|
||||
sftpExtensions = append(sftpExtensions, "invalid@example.com")
|
||||
err = c.configureSFTPExtensions()
|
||||
if err == nil {
|
||||
t.Errorf("configuring invalid SFTP extensions must fail")
|
||||
}
|
||||
sftpExtensions = initialSFTPExtensions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user