fix: sanitize dpi value before passing to guacd

This commit is contained in:
ZacharyZcR
2026-05-13 16:25:18 +08:00
parent 066a503a7a
commit cf27af00ac
+5
View File
@@ -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;