]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix RSPAMD_URL_FLAG_IDN behaviour
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 26 Jul 2021 13:43:50 +0000 (14:43 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 26 Jul 2021 13:43:50 +0000 (14:43 +0100)
src/libserver/url.c

index 726f9b7f8f3694a9273319395a3134bbc034d197..ce98f0961b029130adccb21fc23742b58dca59d0 100644 (file)
@@ -1356,7 +1356,6 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len,
                                }
                                else if (*p != '.' && *p != '-' && *p != '_' && *p != '%') {
                                        if (*p & 0x80) {
-                                               (*flags) |= RSPAMD_URL_FLAG_IDN;
                                                guint i = 0;
 
                                                U8_NEXT (((const guchar *)p), i, last - p, uc);
@@ -1382,6 +1381,9 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len,
                                                                }
                                                        }
                                                }
+                                               else {
+                                                       (*flags) |= RSPAMD_URL_FLAG_IDN;
+                                               }
 
                                                p = p + i;
                                        }