mirror of
https://github.com/rclone/rclone.git
synced 2024-12-19 09:13:43 +08:00
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
|
@ -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 New Issue
Block a user