commit 4f86cba: [Fix] Fix parsing of rfc2047 tokens with '?' inside

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Apr 1 11:42:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-04-01 12:21:36 +0100
URL: https://github.com/rspamd/rspamd/commit/4f86cbac459a99f2fbebde17db4be9f43ba794bf

[Fix] Fix parsing of rfc2047 tokens with '?' inside

---
 src/ragel/rfc2047_parser.rl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ragel/rfc2047_parser.rl b/src/ragel/rfc2047_parser.rl
index 26c016361..88e107be1 100644
--- a/src/ragel/rfc2047_parser.rl
+++ b/src/ragel/rfc2047_parser.rl
@@ -43,7 +43,7 @@
   token = (graph - especials)+;
   charset = token;
   encoding = "Q" | "q" | "B" | "b";
-  encoded_text = (print - ("?"))+;
+  encoded_text = (print+ -- ("?="));
   encoded_word = "=?" charset >Start_Charset %End_Charset
     ("*" language)? "?"
     encoding %End_Encoding "?"


More information about the Commits mailing list