]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Do not allow garbadge when checking url domain
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 29 Sep 2017 18:24:55 +0000 (19:24 +0100)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 17 Oct 2017 22:26:15 +0000 (00:26 +0200)
src/libserver/url.c

index 824c0dff88804e35e773a95d294434ea8ae6338c..f7a73ac5a7f3f992bc828e3e5f68202d91ba8544 100644 (file)
@@ -965,9 +965,17 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len,
 
                                                        p = p + i;
                                                }
-                                               else {
+                                               else if (is_urlsafe (*p)) {
                                                        p ++;
                                                }
+                                               else {
+                                                       if (strict) {
+                                                               goto out;
+                                                       }
+                                                       else {
+                                                               goto set;
+                                                       }
+                                               }
                                        }
                                        else {
                                                p++;