From: Vsevolod Stakhov Date: Thu, 24 Nov 2016 14:04:10 +0000 (+0000) Subject: [Fix] Allow backslashes in http urls X-Git-Tag: 1.4.1~74 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3e2d425eed0a22b386e86b22dee77c7da4601f50;p=rspamd.git [Fix] Allow backslashes in http urls --- diff --git a/src/libserver/url.c b/src/libserver/url.c index a4f82cd9e..c66728aff 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -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;