mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
remove some unnecessary string conversions
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -648,7 +648,7 @@ func (c *Configuration) AcceptInboundConnection(conn net.Conn, config *ssh.Serve
|
||||
|
||||
switch req.Type {
|
||||
case "subsystem":
|
||||
if util.BytesToString(req.Payload[4:]) == "sftp" {
|
||||
if bytes.Equal(req.Payload[4:], []byte("sftp")) {
|
||||
ok = true
|
||||
connection := &Connection{
|
||||
BaseConnection: common.NewBaseConnection(connID, common.ProtocolSFTP, conn.LocalAddr().String(),
|
||||
|
||||
Reference in New Issue
Block a user