From e73ee77ea6a2755225741b8ce14bde08d446fece Mon Sep 17 00:00:00 2001 From: dani <29378233+kheina@users.noreply.github.com> Date: Tue, 12 Aug 2025 15:45:50 -0400 Subject: [PATCH] fix(cmd): url encode the local target address for connect rdp (#1665) --- internal/cmd/commands/connect/rdp.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/cmd/commands/connect/rdp.go b/internal/cmd/commands/connect/rdp.go index bb1c2f67ad..24ce167801 100644 --- a/internal/cmd/commands/connect/rdp.go +++ b/internal/cmd/commands/connect/rdp.go @@ -5,6 +5,7 @@ package connect import ( "fmt" + "net/url" "runtime" "strings" @@ -58,7 +59,7 @@ func (r *rdpFlags) buildArgs(c *Command, port, ip, addr string) []string { case "mstsc.exe": args = append(args, "/v", addr) case "open": - args = append(args, "-n", "-W", fmt.Sprintf("rdp://full%saddress=s:%s", "%20", addr)) + args = append(args, "-n", "-W", fmt.Sprintf("rdp://full%saddress=s%s%s", "%20", "%3A", url.QueryEscape(addr))) } return args }