diff --git a/src/backend/guacamole/routes.ts b/src/backend/guacamole/routes.ts index 1f40c6f7..b77bd981 100644 --- a/src/backend/guacamole/routes.ts +++ b/src/backend/guacamole/routes.ts @@ -192,6 +192,11 @@ router.post( } } + if (guacConfig.dpi != null) { + const parsed = parseInt(String(guacConfig.dpi), 10); + guacConfig.dpi = Number.isFinite(parsed) && parsed > 0 ? parsed : undefined; + } + let token: string; const hostname = host.ip as string; const port = host.port as number; @@ -205,7 +210,8 @@ router.post( port: port || 3389, domain, security: (host.security as string) || undefined, - "ignore-cert": (host.ignoreCert as boolean) || false, + "ignore-cert": + host.ignoreCert !== undefined ? !!host.ignoreCert : true, ...guacConfig, }); break;