]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix obscured url in format user@@example.com
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 5 Oct 2017 18:11:19 +0000 (19:11 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 5 Oct 2017 18:11:19 +0000 (19:11 +0100)
MFH: rspamd-1.6

src/libserver/url.c

index f7a73ac5a7f3f992bc828e3e5f68202d91ba8544..4d458e15a7e872fc1db75bf6685202aead15d965 100644 (file)
@@ -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 == '#') {