diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-05 19:11:19 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-05 19:11:19 +0100 |
commit | 26e7294bf52f3b74dfad5c4bd27fb77d26c2e7d0 (patch) | |
tree | 176253471efb1a582c3e87cefdfb8c8ee3baaf2e /src/libserver/url.c | |
parent | 0471d9123e7addda8d195516e3d63cabc4e26e9e (diff) | |
download | rspamd-26e7294bf52f3b74dfad5c4bd27fb77d26c2e7d0.tar.gz rspamd-26e7294bf52f3b74dfad5c4bd27fb77d26c2e7d0.zip |
[Fix] Fix obscured url in format user@@example.com
MFH: rspamd-1.6
Diffstat (limited to 'src/libserver/url.c')
-rw-r--r-- | src/libserver/url.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c index f7a73ac5a..4d458e15a 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -888,12 +888,19 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len, break; case parse_at: c = p; - st = parse_domain; - if (t == '[') { + + if (t == '@') { + *flags |= RSPAMD_URL_FLAG_OBSCURED; + p ++; + } + else if (t == '[') { st = parse_ipv6; p++; c = p; } + else { + st = parse_domain; + } break; case parse_domain: if (t == '/' || t == ':' || t == '?' || t == '#') { |