mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 20:26:48 +00:00
fix(console): the console daemons hold to what the console page allowed
The token now names the console type it was made for: novncd accepts only a VNC page's token and socketiod only a serial page's, so a VNC page's token no longer opens the serial console without the VNC password. A VNC session re-checks every 10 s, as the serial one did, that its user may still open the console; a deactivated user or a removed owner loses it. The check (may_still_open) moves to console.tokens for both daemons.
This commit is contained in:
parent
f670ee7333
commit
458074df82
10 changed files with 110 additions and 74 deletions
|
|
@ -61,7 +61,7 @@ def connect(sid, environ, auth):
|
|||
if not settings.SERIAL_CONSOLE_ENABLED:
|
||||
raise refused("The serial console is turned off on this server")
|
||||
try:
|
||||
instance, user = authorize((auth or {}).get("token"))
|
||||
instance, user = authorize((auth or {}).get("token"), "pty")
|
||||
except PermissionError:
|
||||
raise refused("The console link has expired, or you may no longer open this console: reload the page")
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue