mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 14:15:24 +00:00
fix(docker): retain stored SSH credential association (#1543)
This commit is contained in:
1 parent
117e125d55
commit
4785bf5dfa
2 files changed
+43
-6
No files matched your search
@@ -210,11 +210,13 @@ export function registerRoutes(router: Router, { ctx, sessions, log }: Deps) {
|
||||
),
|
||||
);
|
||||
|
||||
const target: PluginSshHost = {
|
||||
...host,
|
||||
id: numericHostId,
|
||||
port: host.port || 22,
|
||||
};
|
||||
const hasAuthOverride = [
|
||||
userProvidedPassword,
|
||||
userProvidedSshKey,
|
||||
userProvidedKeyPassword,
|
||||
].some((value) => typeof value === "string" && value.length > 0);
|
||||
// Core associates the redacted host object with its stored credentials.
|
||||
const target: PluginSshHost = hasAuthOverride ? { ...host } : host;
|
||||
if (typeof userProvidedPassword === "string" && userProvidedPassword) {
|
||||
target.password = userProvidedPassword;
|
||||
target.authType = "password";
|
||||
|
||||
Reference in new issue
Block a user