]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Allow backslashes in http urls
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 24 Nov 2016 14:04:10 +0000 (14:04 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 24 Nov 2016 14:04:10 +0000 (14:04 +0000)
src/libserver/url.c

index a4f82cd9e4e0970ac3734d52fea8823b70d421d8..c66728aff8f823af38cec38805ef407ca614d940 100644 (file)
@@ -716,7 +716,7 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len,
                                p++;
                                break;
                        case parse_semicolon:
-                               if (t == '/') {
+                               if (t == '/' || t == '\\') {
                                        st = parse_slash;
                                        p++;
                                }
@@ -725,7 +725,7 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len,
                                }
                                break;
                        case parse_slash:
-                               if (t == '/') {
+                               if (t == '/' || t == '\\') {
                                        st = parse_slash_slash;
                                }
                                else {
@@ -735,7 +735,7 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len,
                                break;
                        case parse_slash_slash:
 
-                               if (t != '/') {
+                               if (t != '/' && t != '\\') {
                                        c = p;
                                        st = parse_domain;
                                        slash = p;