[exim-cvs] Handle TAB, not just SP, in MAIL args.

Góra strony
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
Dla: exim-cvs
Temat: [exim-cvs] Handle TAB, not just SP, in MAIL args.
Gitweb: http://git.exim.org/exim.git/commitdiff/7db8d07471d9e75fa506addff7f973c10a710895
Commit:     7db8d07471d9e75fa506addff7f973c10a710895
Parent:     76ba6b0ad36260e9009b2d0861e222062589c514
Author:     Phil Pennock <pdp@???>
AuthorDate: Thu Apr 12 19:33:48 2012 -0700
Committer:  Phil Pennock <pdp@???>
CommitDate: Thu Apr 12 19:33:48 2012 -0700


    Handle TAB, not just SP, in MAIL args.


    Analysis, diagnosis and variant patch by Todd Lyons.
---
 doc/doc-txt/ChangeLog |    4 ++++
 src/src/smtp_in.c     |    3 ++-
 2 files changed, 6 insertions(+), 1 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index f24e1a8..ee63f41 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -41,6 +41,10 @@ PP/10 Added dbmjz lookup type.

PP/11 Let heimdal_gssapi authenticator take a SASL message without an authzid.

+PP/12 MAIL args handles TAB as well as SP, for better interop with
+      non-compliant senders.
+      Analysis and variant patch by Todd Lyons.
+


Exim version 4.77
-----------------
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index e79f0a2..476bbf0 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -983,7 +983,8 @@ if (*v != '=') return FALSE;
n = v;
while(isalpha(n[-1])) n--;

-if (n[-1] != ' ') return FALSE;
+/* RFC says SP, but TAB seen in wild and other major MTAs accept it */
+if (!isspace(n[-1])) return FALSE;

n[-1] = 0;
*name = n;