summaryrefslogtreecommitdiff
path: root/auth-options.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2022-02-08 08:59:12 +0000
committerDamien Miller <djm@mindrot.org>2022-02-10 15:14:17 +1100
commit45279abceb37c3cbfac8ba36dde8b2c8cdd63d32 (patch)
tree739b13b19b03c5c8f0b65ff8188240d4f4ee68c1 /auth-options.c
parenta1bcbf04a7c2d81944141db7ecd0ba292d175a66 (diff)
downloadopenssh-git-45279abceb37c3cbfac8ba36dde8b2c8cdd63d32.tar.gz
upstream: Switch hpdelim interface to accept only ":" as delimiter.
Historicallly, hpdelim accepted ":" or "/" as a port delimiter between hosts (or addresses) and ports. These days most of the uses for "/" are no longer accepted, so there are several places where it checks the delimiter to disallow it. Make hpdelim accept only ":" and use hpdelim2 in the other cases. ok djm@ OpenBSD-Commit-ID: 7e6420bd1be87590b6840973f5ad5305804e3102
Diffstat (limited to 'auth-options.c')
-rw-r--r--auth-options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/auth-options.c b/auth-options.c
index 335f0323..7cb2a640 100644
--- a/auth-options.c
+++ b/auth-options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth-options.c,v 1.97 2021/07/24 01:55:19 djm Exp $ */
+/* $OpenBSD: auth-options.c,v 1.98 2022/02/08 08:59:12 dtucker Exp $ */
/*
* Copyright (c) 2018 Damien Miller <djm@mindrot.org>
*
@@ -282,7 +282,7 @@ handle_permit(const char **optsp, int allow_bare_port,
}
cp = tmp;
/* validate syntax before recording it. */
- host = hpdelim(&cp);
+ host = hpdelim2(&cp, NULL);
if (host == NULL || strlen(host) >= NI_MAXHOST) {
free(tmp);
free(opt);