net/netcheck: don't use a space in the captive portal challenge

The derpers don't allow whitespace in the challenge.

Change-Id: I93a8b073b846b87854fba127b5c1d80db205f658
Signed-off-by: Andrew Dunham <andrew@tailscale.com>
This commit is contained in:
Andrew Dunham
2022-11-08 16:41:20 -05:00
committed by Andrew Dunham
parent cba1312dab
commit e85613aa2d
2 changed files with 9 additions and 1 deletions

View File

@@ -85,6 +85,11 @@ func TestNoContent(t *testing.T) {
input: "input",
want: "response input",
},
{
name: "valid challenge hostname",
input: "ts_derp99b.tailscale.com",
want: "response ts_derp99b.tailscale.com",
},
{
name: "invalid challenge",
input: "foo\x00bar",