fix (#169): upgrade goFTP

This commit is contained in:
Mickael Kerjean 2020-06-22 02:17:58 +10:00
parent 6d7d83b068
commit 40c791b717
4 changed files with 17 additions and 2 deletions

2
go.mod
View file

@ -15,7 +15,7 @@ require (
github.com/mitchellh/hashstructure v1.0.0
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/sftp v1.11.0
github.com/secsy/goftp v0.0.0-20190720192957-f31499d7c79a
github.com/secsy/goftp v0.0.0-20200609142545-aa2de14babf4
github.com/sirupsen/logrus v1.4.2 // indirect
github.com/stretchr/testify v1.4.0
github.com/tidwall/gjson v1.3.5

2
go.sum
View file

@ -90,6 +90,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/secsy/goftp v0.0.0-20190720192957-f31499d7c79a h1:C6IhVTxNkhlb0tlCB6JfHOUv1f0xHPK7V8X4HlJZEJw=
github.com/secsy/goftp v0.0.0-20190720192957-f31499d7c79a/go.mod h1:MnkX001NG75g3p8bhFycnyIjeQoOjGL6CEIsdE/nKSY=
github.com/secsy/goftp v0.0.0-20200609142545-aa2de14babf4 h1:PT+ElG/UUFMfqy5HrxJxNzj3QBOf7dZwupeVC+mG1Lo=
github.com/secsy/goftp v0.0.0-20200609142545-aa2de14babf4/go.mod h1:MnkX001NG75g3p8bhFycnyIjeQoOjGL6CEIsdE/nKSY=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=

View file

@ -250,6 +250,19 @@ func (pconn *persistentConn) logIn() error {
return ftpError{code: code, msg: msg}
}
if pconn.config.TLSConfig != nil && pconn.config.TLSMode == TLSImplicit {
err = pconn.sendCommandExpected(replyGroupPositiveCompletion, "PBSZ 0")
if err != nil {
return err
}
err = pconn.sendCommandExpected(replyGroupPositiveCompletion, "PROT P")
if err != nil {
return err
}
}
return nil
}

2
vendor/modules.txt vendored
View file

@ -108,7 +108,7 @@ github.com/pkg/errors
github.com/pkg/sftp
# github.com/pmezard/go-difflib v1.0.0
github.com/pmezard/go-difflib/difflib
# github.com/secsy/goftp v0.0.0-20190720192957-f31499d7c79a
# github.com/secsy/goftp v0.0.0-20200609142545-aa2de14babf4
github.com/secsy/goftp
# github.com/sergi/go-diff v1.0.0
github.com/sergi/go-diff/diffmatchpatch