mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-14 16:40:05 +00:00
filter out unsupported SSH algos - fixes #5942
This commit is contained in:
parent
1f73cd11b2
commit
0560196546
@ -16,9 +16,10 @@ import { PasswordStorageService } from '../services/passwordStorage.service'
|
|||||||
import { SSHKnownHostsService } from '../services/sshKnownHosts.service'
|
import { SSHKnownHostsService } from '../services/sshKnownHosts.service'
|
||||||
import { promisify } from 'util'
|
import { promisify } from 'util'
|
||||||
import { SFTPSession } from './sftp'
|
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 { ForwardedPort } from './forwards'
|
||||||
import { X11Socket } from './x11'
|
import { X11Socket } from './x11'
|
||||||
|
import { supportedAlgorithms } from '../algorithms'
|
||||||
|
|
||||||
const WINDOWS_OPENSSH_AGENT_PIPE = '\\\\.\\pipe\\openssh-ssh-agent'
|
const WINDOWS_OPENSSH_AGENT_PIPE = '\\\\.\\pipe\\openssh-ssh-agent'
|
||||||
|
|
||||||
@ -201,7 +202,7 @@ export class SSHSession {
|
|||||||
let connected = false
|
let connected = false
|
||||||
const algorithms = {}
|
const algorithms = {}
|
||||||
for (const key of Object.values(SSHAlgorithmType)) {
|
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) => {
|
const hostVerifiedPromise: Promise<void> = new Promise((resolve, reject) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user