rusackas commented on PR #40673: URL: https://github.com/apache/superset/pull/40673#issuecomment-4710761411
@sha174n dug into this — pushed `9880247f53`. Fix is to pass the expected key as `ssh_host_key` to `open_tunnel`, so paramiko verifies the host key on the tunnel's *own* transport, not just the pre-flight probe — that closes the TOCTOU window (DNS re-resolution / selective interception between the two connections). I kept the probe, though: `sshtunnel`'s `_create_tunnels` catches paramiko's host-key `SSHException` and re-raises a generic "could not establish session", so the probe is what preserves the specific mismatch message + the strict-no-key check. Belt and suspenders. Good catch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
