mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 15:45:07 -05:00
client: don't allow slash with hostname in allow/deny command
This commit is contained in:
2
client.c
2
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) {
|
(n = sscanf(p, "%lu.%lu.%lu.%lu", &a, &b, &c, &d)) <= 0) {
|
||||||
|
|
||||||
/* Try to parse as the name of a machine */
|
/* 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");
|
LOG(LOGS_ERR, "Could not read address");
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user