From 45279abceb37c3cbfac8ba36dde8b2c8cdd63d32 Mon Sep 17 00:00:00 2001 From: "dtucker@openbsd.org" Date: Tue, 8 Feb 2022 08:59:12 +0000 Subject: 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 --- auth-options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'auth-options.c') 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 * @@ -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); -- cgit v1.2.1