commit df806bc: [Minor] Skip spaces in malformed SMTP addresses

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Jul 21 14:49:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-07-21 15:46:38 +0100
URL: https://github.com/rspamd/rspamd/commit/df806bccd476072784c855a2c995f0e63b535427 (HEAD -> master)

[Minor] Skip spaces in malformed SMTP addresses
Issue: #3812

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

diff --git a/src/ragel/smtp_address.rl b/src/ragel/smtp_address.rl
index 68226f748..9fe9f35eb 100644
--- a/src/ragel/smtp_address.rl
+++ b/src/ragel/smtp_address.rl
@@ -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 = "<" UnangledPath ">" %Addr_has_angle;
+  AngledPath = "<" FWS? UnangledPath FWS? ">" %Addr_has_angle;
   Path = AngledPath | UnangledPath;
   SMTPAddr = space* (Path | "<>" %Empty_addr ) %Valid_addr space*;
 }%%


More information about the Commits mailing list