mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
improve SFTP loop detection
This commit is contained in:
@@ -30,6 +30,7 @@ var (
|
||||
// ErrVfsUnsupported defines the error for an unsupported VFS operation
|
||||
ErrVfsUnsupported = errors.New("not supported")
|
||||
credentialsDirPath string
|
||||
sftpFingerprints []string
|
||||
)
|
||||
|
||||
// SetCredentialsDirPath sets the credentials dir path
|
||||
@@ -42,6 +43,11 @@ func GetCredentialsDirPath() string {
|
||||
return credentialsDirPath
|
||||
}
|
||||
|
||||
// SetSFTPFingerprints sets the SFTP host key fingerprints
|
||||
func SetSFTPFingerprints(fp []string) {
|
||||
sftpFingerprints = fp
|
||||
}
|
||||
|
||||
// Fs defines the interface for filesystem backends
|
||||
type Fs interface {
|
||||
Name() string
|
||||
|
||||
Reference in New Issue
Block a user