]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Use space category in ragel automata to resolve space characters
authorVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 2 Sep 2022 22:35:12 +0000 (23:35 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 2 Sep 2022 22:35:12 +0000 (23:35 +0100)
Issue: #4247

src/ragel/smtp_address.rl

index 9fe9f35ebcaeb790da3baa23b3521fd3ae6a9db2..0caf1a65e4fc0dc6121be47dea153051f724c95d 100644 (file)
@@ -30,7 +30,7 @@
   Local_part     = Dot_string >User_start %User_end | Quoted_string;
   Mailbox        = Local_part "@" (address_literal | Domain >Domain_start %Domain_end);
   UnangledPath = ( Adl ":" )? Mailbox >Addr_start %Addr_end "."?;
-  AngledPath = "<" FWS? UnangledPath FWS? ">" %Addr_has_angle;
+  AngledPath = "<" space* UnangledPath space* ">" %Addr_has_angle;
   Path = AngledPath | UnangledPath;
   SMTPAddr = space* (Path | "<>" %Empty_addr ) %Valid_addr space*;
 }%%