diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-04-18 20:40:38 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-04-18 20:40:38 +0100 |
commit | 2944572017edb0b5660eb311c9342d19c8737387 (patch) | |
tree | cf4d7cf426a48d934dbc0893a6a7b2e409f73695 /src/libserver | |
parent | 55bc63e1e841292aca245ce3e2c44d5582580c8a (diff) | |
download | rspamd-2944572017edb0b5660eb311c9342d19c8737387.tar.gz rspamd-2944572017edb0b5660eb311c9342d19c8737387.zip |
[Minor] Stop polluting logs on garbadge urls
Issue: #3688
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/url.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c index a97db640a..6f62702b3 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -1803,7 +1803,7 @@ rspamd_url_is_ip (struct rspamd_url *uri, rspamd_mempool_t *pool) end--; } - if (end - p == 0) { + if (end - p == 0 || end - p > INET6_ADDRSTRLEN) { return FALSE; } @@ -1832,7 +1832,7 @@ rspamd_url_is_ip (struct rspamd_url *uri, rspamd_mempool_t *pool) if (shift < 32 && ((*p == '.' && dots < 3) || (p == end && dots <= 3))) { if (p - c + 1 >= (gint) sizeof (buf)) { - msg_err_pool ("invalid numeric url %*.s...: too long", + msg_debug_pool ("invalid numeric url %*.s...: too long", INET6_ADDRSTRLEN, c); return FALSE; } |