commit e17309d: [Minor] Fix RSPAMD_URL_FLAG_IDN behaviour
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Jul 26 13:49:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-07-26 14:43:50 +0100
URL: https://github.com/rspamd/rspamd/commit/e17309d3727526fb8cf2403642c739dcdbaae587 (HEAD -> master)
[Minor] Fix RSPAMD_URL_FLAG_IDN behaviour
---
src/libserver/url.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/libserver/url.c b/src/libserver/url.c
index 726f9b7f8..ce98f0961 100644
--- a/src/libserver/url.c
+++ b/src/libserver/url.c
@@ -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;
}
More information about the Commits
mailing list