]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix some corner cases
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 5 Jun 2018 12:56:13 +0000 (13:56 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 5 Jun 2018 12:56:13 +0000 (13:56 +0100)
src/libserver/url.c

index 8e4cb21332d5598bd071f6e82fcc0853d275c358..d9ddf8357ab1138d535d62c0044e6e4f1e3e266b 100644 (file)
@@ -1016,7 +1016,8 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len,
 
                                        while (tmp < last) {
                                                if (!g_ascii_isdigit (*tmp)) {
-                                                       if (*tmp == '/' || *tmp == '#' || *tmp == '?') {
+                                                       if (*tmp == '/' || *tmp == '#' || *tmp == '?' ||
+                                                                       is_url_end (*tmp)) {
                                                                /* Port + something */
                                                                st = parse_port;
                                                                c = slash;