From 77fc5c42b94a5862b4c68acf7d644028ae9b9c86 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 25 Jul 2017 12:56:59 +0200 Subject: [PATCH] client: don't allow slash with hostname in allow/deny command --- client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.c b/client.c index eae6983..cfe18a0 100644 --- a/client.c +++ b/client.c @@ -796,7 +796,7 @@ parse_allow_deny(CMD_Request *msg, char *line) (n = sscanf(p, "%lu.%lu.%lu.%lu", &a, &b, &c, &d)) <= 0) { /* Try to parse as the name of a machine */ - if (DNS_Name2IPAddress(p, &ip, 1) != DNS_Success) { + if (slashpos || DNS_Name2IPAddress(p, &ip, 1) != DNS_Success) { LOG(LOGS_ERR, "Could not read address"); return 0; } else {