[pve-devel] Allow external vnc access via vncwebsocket
Entwickler (centron GmbH)
entwickler at centron.de
Fri Feb 2 09:45:43 CET 2018
This allows Access to novnc from an external Webinterface to user vnc.
--- /usr/share/perl5/PVE/HTTPServer.pm 2018-01-17 09:18:26.000000000 +0100
@@ -76,11 +76,16 @@
if ($require_auth) {
- die "No ticket\n" if !$ticket;
-
- ($username, $age) = PVE::AccessControl::verify_ticket($ticket);
-
- $rpcenv->set_user($username);
+ if ($rel_uri =~ /vncwebsocket/ && $method eq 'GET' && !$ticket)
+ {
+ $rpcenv->set_user("vnc\@pve");
+ $username = "vnc\@pve";
+ $age = 60;
+ } else {
+ die "No ticket\n" if !$ticket;
+ ($username, $age) = PVE::AccessControl::verify_ticket($ticket);
+ $rpcenv->set_user($username);
+ }
if ($method eq 'POST' && $rel_uri =~ m|^/nodes/([^/]+)/storage/([^/]+)/upload$|) {
my ($node, $storeid) = ($1, $2);
More information about the pve-devel
mailing list