[pve-devel] [PATCH xtermjs] change localhost to 127.0.0.1

Dominik Csapak d.csapak at proxmox.com
Tue May 8 10:54:16 CEST 2018


since pvedaemon listens on 127.0.0.1 we should connect there and
not assume localhost resolves to 127.0.0.1

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
this fixes an issue if localhost is also set to
resolve to ::1 it did not work since the daemon
only listens on its ipv4 address
 src/PVE/CLI/termproxy.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/CLI/termproxy.pm b/src/PVE/CLI/termproxy.pm
index 28935b4..010f1fe 100644
--- a/src/PVE/CLI/termproxy.pm
+++ b/src/PVE/CLI/termproxy.pm
@@ -27,7 +27,7 @@ sub verify_ticket {
 
     $params->{privs} = $perm if $perm;
 
-    my $res = $ua->post ('http://localhost:85/api2/json/access/ticket', Content => $params);
+    my $res = $ua->post ('http://127.0.0.1:85/api2/json/access/ticket', Content => $params);
 
     if (!$res->is_success) {
 	my $err = $res->status_line;
-- 
2.11.0





More information about the pve-devel mailing list