forked from TrueCloudLab/rclone
sftp: fix nil check when using auth proxy
An incorrect nil check was spotted while reviewing the code for CVE-2024-45337. The nil check failing has never happened as far as we know. The consequences would be a nil pointer exception.
This commit is contained in:
parent
96fe25cf0a
commit
f9946b37f9
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ func (s *server) getVFS(what string, sshConn *ssh.ServerConn) (VFS *vfs.VFS) {
|
|||
if s.proxy == nil {
|
||||
return s.vfs
|
||||
}
|
||||
if sshConn.Permissions == nil && sshConn.Permissions.Extensions == nil {
|
||||
if sshConn.Permissions == nil || sshConn.Permissions.Extensions == nil {
|
||||
fs.Infof(what, "SSH Permissions Extensions not found")
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue