mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-15 21:03:47 +00:00
fix: sanitize dpi value before passing to guacd
This commit is contained in:
@@ -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;
|
let token: string;
|
||||||
const hostname = host.ip as string;
|
const hostname = host.ip as string;
|
||||||
const port = host.port as number;
|
const port = host.port as number;
|
||||||
|
|||||||
Reference in New Issue
Block a user