Explorar o código

filter out unsupported SSH algos - fixes #5942

Eugene Pankov %!s(int64=3) %!d(string=hai) anos
pai
achega
0560196546
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      tabby-ssh/src/session/ssh.ts

+ 3 - 2
tabby-ssh/src/session/ssh.ts

@@ -16,9 +16,10 @@ import { PasswordStorageService } from '../services/passwordStorage.service'
 import { SSHKnownHostsService } from '../services/sshKnownHosts.service'
 import { promisify } from 'util'
 import { SFTPSession } from './sftp'
-import { ALGORITHM_BLACKLIST, SSHAlgorithmType, PortForwardType, SSHProfile, SSHProxyStream, AutoPrivateKeyLocator } from '../api'
+import { SSHAlgorithmType, PortForwardType, SSHProfile, SSHProxyStream, AutoPrivateKeyLocator } from '../api'
 import { ForwardedPort } from './forwards'
 import { X11Socket } from './x11'
+import { supportedAlgorithms } from '../algorithms'
 
 const WINDOWS_OPENSSH_AGENT_PIPE = '\\\\.\\pipe\\openssh-ssh-agent'
 
@@ -201,7 +202,7 @@ export class SSHSession {
         let connected = false
         const algorithms = {}
         for (const key of Object.values(SSHAlgorithmType)) {
-            algorithms[key] = this.profile.options.algorithms![key].filter(x => !ALGORITHM_BLACKLIST.includes(x))
+            algorithms[key] = this.profile.options.algorithms![key].filter(x => supportedAlgorithms[key].includes(x))
         }
 
         const hostVerifiedPromise: Promise<void> = new Promise((resolve, reject) => {