mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 06:35:24 +00:00
feat: harden plugin api for separate repos, signed updates and generic external login
This commit is contained in:
1 parent
fb9c168b6b
commit
80944301dd
310 files changed
+6577
-4927
No files matched your search
@@ -636,7 +636,8 @@ export function registerRoutes(router: Router, deps: RouteDeps): void {
|
||||
return res.status(400).json({ error: "Missing host" });
|
||||
}
|
||||
try {
|
||||
const result = await ctx.desktop.launchNativeRdp({
|
||||
const result = await ctx.desktop.launchExternalClient({
|
||||
protocol: "rdp",
|
||||
host: body.host,
|
||||
port: Number(body.port) || DEFAULT_PORT.rdp,
|
||||
username: typeof body.username === "string" ? body.username : undefined,
|
||||
|
||||
@@ -117,17 +117,8 @@ export class GuacamoleTokenService {
|
||||
}
|
||||
}
|
||||
|
||||
const jwtSecret = process.env.JWT_SECRET;
|
||||
if (jwtSecret) {
|
||||
return crypto
|
||||
.createHash("sha256")
|
||||
.update(jwtSecret + "_guacamole")
|
||||
.digest();
|
||||
}
|
||||
|
||||
this.log.warn("No persistent encryption key found, generating random key", {
|
||||
operation: "guac_key_generation",
|
||||
});
|
||||
// A token lives for seconds between issue and connect, so a fresh key
|
||||
// per boot is enough and nothing is derived from core's own secrets.
|
||||
return crypto.randomBytes(KEY_LENGTH);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user