diff --git a/cmd/serve/sftp/connection.go b/cmd/serve/sftp/connection.go index d8be2bce5..d9eaf855d 100644 --- a/cmd/serve/sftp/connection.go +++ b/cmd/serve/sftp/connection.go @@ -101,6 +101,9 @@ func (c *conn) execCommand(ctx context.Context, out io.Writer, command string) ( if binary == "sha1sum" { ht = hash.SHA1 } + if !c.vfs.Fs().Hashes().Contains(ht) { + return fmt.Errorf("%v hash not supported", ht) + } var hashSum string if args == "" { // empty hash for no input