summaryrefslogtreecommitdiff
path: root/usr.bin/nc
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2022-06-08 20:20:27 +0000
committerDamien Miller <djm@cvs.openbsd.org>2022-06-08 20:20:27 +0000
commit1d1deb8a81a4cc07ac94331837084e64bc66f124 (patch)
tree86a07348c6ff1cf7ca16fbd89319f1c15afc7c12 /usr.bin/nc
parent14c1754651fbf0894f9f94c521c9cc18151f935c (diff)
do not refuse valid IPv6 addresses in -X connect (HTTP CONNECT proxy)
support. Identified by Wilmer van der Gaast, ok millert@
Diffstat (limited to 'usr.bin/nc')
-rw-r--r--usr.bin/nc/socks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/nc/socks.c b/usr.bin/nc/socks.c
index 9766be7da49..7c7448c9c5f 100644
--- a/usr.bin/nc/socks.c
+++ b/usr.bin/nc/socks.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: socks.c,v 1.30 2019/11/04 17:33:28 millert Exp $ */
+/* $OpenBSD: socks.c,v 1.31 2022/06/08 20:20:26 djm Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist. All rights reserved.
@@ -321,7 +321,7 @@ socks_connect(const char *host, const char *port,
/* HTTP proxy CONNECT */
/* Disallow bad chars in hostname */
- if (strcspn(host, "\r\n\t []:") != strlen(host))
+ if (strcspn(host, "\r\n\t []") != strlen(host))
errx(1, "Invalid hostname");
/* Try to be sane about numeric IPv6 addresses */