vendor: update github.com/goftp/server - fixes #2845

s3-about
Nick Craig-Wood 2019-01-12 17:09:11 +00:00
parent 781142a73f
commit 8d16a5693c
4 changed files with 17 additions and 4 deletions

2
go.mod
View File

@ -18,7 +18,7 @@ require (
github.com/djherbis/times v1.1.0
github.com/dropbox/dropbox-sdk-go-unofficial v5.4.0+incompatible
github.com/goftp/file-driver v0.0.0-20180502053751-5d604a0fc0c9 // indirect
github.com/goftp/server v0.0.0-20180914132916-1fd52c8552f1
github.com/goftp/server v0.0.0-20190111142836-88de73f463af
github.com/google/go-querystring v1.0.0 // indirect
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect

2
go.sum
View File

@ -39,6 +39,8 @@ github.com/goftp/file-driver v0.0.0-20180502053751-5d604a0fc0c9 h1:cC0Hbb+18DJ4i
github.com/goftp/file-driver v0.0.0-20180502053751-5d604a0fc0c9/go.mod h1:GpOj6zuVBG3Inr9qjEnuVTgBlk2lZ1S9DcoFiXWyKss=
github.com/goftp/server v0.0.0-20180914132916-1fd52c8552f1 h1:WjgeEHEDLGx56ndxS6FYi6qFjZGajSVHPuEPdpJ60cI=
github.com/goftp/server v0.0.0-20180914132916-1fd52c8552f1/go.mod h1:k/SS6VWkxY7dHPhoMQ8IdRu8L4lQtmGbhyXGg+vCnXE=
github.com/goftp/server v0.0.0-20190111142836-88de73f463af h1:PJxb1aA1z+Ohy2j28L92+ng9phXpZVFRFbPkfmJcRGo=
github.com/goftp/server v0.0.0-20190111142836-88de73f463af/go.mod h1:k/SS6VWkxY7dHPhoMQ8IdRu8L4lQtmGbhyXGg+vCnXE=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=

View File

@ -14,6 +14,7 @@ import (
"strings"
"sync"
"syscall"
"time"
)
// DataSocket describes a data socket is used to send non-control data between the client and
@ -208,13 +209,23 @@ func (socket *ftpPassiveSocket) GoListenAndServe(sessionID string) (err error) {
return
}
var listener net.Listener
listener, err = net.ListenTCP("tcp", laddr)
var tcplistener *net.TCPListener
tcplistener, err = net.ListenTCP("tcp", laddr)
if err != nil {
socket.logger.Print(sessionID, err)
return
}
// The timeout, for a remote client to establish connection
// with a PASV style data connection.
const acceptTimeout = 60 * time.Second
err = tcplistener.SetDeadline(time.Now().Add(acceptTimeout))
if err != nil {
socket.logger.Print(sessionID, err)
return
}
var listener net.Listener = tcplistener
add := listener.Addr()
parts := strings.Split(add.String(), ":")
port, err := strconv.Atoi(parts[len(parts)-1])

2
vendor/modules.txt vendored
View File

@ -83,7 +83,7 @@ github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/seen_state
github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common
github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies
github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users_common
# github.com/goftp/server v0.0.0-20180914132916-1fd52c8552f1
# github.com/goftp/server v0.0.0-20190111142836-88de73f463af
github.com/goftp/server
# github.com/golang/protobuf v1.2.0
github.com/golang/protobuf/proto