]> git.proxmox.com Git - pve-access-control.git/commitdiff
remote_viewer_config: brackets around ipv6 http address
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 27 May 2015 07:30:55 +0000 (09:30 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 27 May 2015 09:14:29 +0000 (11:14 +0200)
PVE/AccessControl.pm

index a1b49718b557ea833296be2e7bd28235eb70daab..2b7044e2393039aab16dad482e76b0cfd6c29b76 100644 (file)
@@ -6,6 +6,7 @@ use Encode;
 use Crypt::OpenSSL::Random;
 use Crypt::OpenSSL::RSA;
 use Net::SSLeay;
+use Net::IP;
 use MIME::Base64;
 use Digest::SHA;
 use Digest::HMAC_SHA1;
@@ -317,6 +318,7 @@ sub remote_viewer_config {
     my $cacert = PVE::Tools::file_get_contents("/etc/pve/pve-root-ca.pem", 8192);
     $cacert =~ s/\n/\\n/g;
 
+    $proxy = "[$proxy]" if Net::IP::ip_is_ipv6($proxy);
     my $config = {
        'secure-attention' => "Ctrl+Alt+Ins",
        'toggle-fullscreen' => "Shift+F11",