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);
_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to