From 04127efebacaaa088668198cdbe52f933367b731 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 28 Sep 2019 13:37:22 +0100 Subject: [Fix] Distinguish remote and local addrs parsing --- src/controller.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/controller.c') diff --git a/src/controller.c b/src/controller.c index 474e7ec92..27c6d18cc 100644 --- a/src/controller.c +++ b/src/controller.c @@ -434,7 +434,8 @@ rspamd_controller_check_forwarded (struct rspamd_controller_session *session, comma = hdr->begin; } if (rspamd_parse_inet_address (&addr, comma, - (hdr->begin + hdr->len) - comma)) { + (hdr->begin + hdr->len) - comma, + RSPAMD_INET_ADDRESS_PARSE_NO_UNIX)) { /* We have addr now, so check if it is still trusted */ if (ctx->secure_map && rspamd_match_radix_map_addr (ctx->secure_map, addr) != NULL) { @@ -463,7 +464,8 @@ rspamd_controller_check_forwarded (struct rspamd_controller_session *session, hdr = rspamd_http_message_find_header (msg, alt_hdr_name); if (hdr) { - if (rspamd_parse_inet_address (&addr, hdr->begin, hdr->len)) { + if (rspamd_parse_inet_address (&addr, hdr->begin, hdr->len, + RSPAMD_INET_ADDRESS_PARSE_NO_UNIX)) { /* We have addr now, so check if it is still trusted */ if (ctx->secure_map && rspamd_match_radix_map_addr (ctx->secure_map, addr) != NULL) { -- cgit v1.2.3