summaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorMaisem Ali <maisem@tailscale.com>2022-04-21 17:29:27 -0700
committerMaisem Ali <maisem@gmail.com>2022-04-21 17:43:04 -0700
commit90b5f6286c3ac773dda0090da8595387acb117cf (patch)
treee1552ef54bbdd60f86cc7f7e5e82666dac03d13b /cmd
parentdb707746857620801f5a246c61949b13dfd23782 (diff)
downloadtailscale-90b5f6286c3ac773dda0090da8595387acb117cf.tar.xz
tailscale-90b5f6286c3ac773dda0090da8595387acb117cf.zip
cmd/tailscale: use double quotes in the ssh subcommands
Single-quote escaping is insufficient apparently. Updates #3802 Signed-off-by: Maisem Ali <maisem@tailscale.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/tailscale/cli/ssh.go11
-rw-r--r--cmd/tailscale/depaware.txt1
2 files changed, 4 insertions, 8 deletions
diff --git a/cmd/tailscale/cli/ssh.go b/cmd/tailscale/cli/ssh.go
index d1f990d0d..e828763c4 100644
--- a/cmd/tailscale/cli/ssh.go
+++ b/cmd/tailscale/cli/ssh.go
@@ -18,7 +18,6 @@ import (
"strings"
"syscall"
- "github.com/alessio/shellescape"
"github.com/peterbourgon/ff/v3/ffcli"
"inet.af/netaddr"
"tailscale.com/client/tailscale"
@@ -81,15 +80,13 @@ func runSSH(ctx context.Context, args []string) error {
ssh,
// Only trust SSH hosts that we know about.
- "-o", fmt.Sprintf("UserKnownHostsFile %s",
- shellescape.Quote(knownHostsFile),
- ),
+ "-o", fmt.Sprintf("UserKnownHostsFile %q", knownHostsFile),
"-o", "UpdateHostKeys no",
"-o", "StrictHostKeyChecking yes",
- "-o", fmt.Sprintf("ProxyCommand %s --socket=%s nc %%h %%p",
- shellescape.Quote(tailscaleBin),
- shellescape.Quote(rootArgs.socket),
+ "-o", fmt.Sprintf("ProxyCommand %q --socket=%q nc %%h %%p",
+ tailscaleBin,
+ rootArgs.socket,
),
// Explicitly rebuild the user@host argument rather than
diff --git a/cmd/tailscale/depaware.txt b/cmd/tailscale/depaware.txt
index f80bea3b2..ef1fac7d9 100644
--- a/cmd/tailscale/depaware.txt
+++ b/cmd/tailscale/depaware.txt
@@ -1,6 +1,5 @@
tailscale.com/cmd/tailscale dependencies: (generated by github.com/tailscale/depaware)
- github.com/alessio/shellescape from tailscale.com/cmd/tailscale/cli
W 💣 github.com/alexbrainman/sspi from github.com/alexbrainman/sspi/negotiate+
W github.com/alexbrainman/sspi/internal/common from github.com/alexbrainman/sspi/negotiate
W 💣 github.com/alexbrainman/sspi/negotiate from tailscale.com/net/tshttpproxy