diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2017-01-24 18:17:10 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2017-01-24 18:17:10 +0000 |
commit | d7a2c8337f7b615763d4429ab27653862756b6fb (patch) | |
tree | 2773466acc4e142d3be96b9f30ab139e2d7ac5cc /src | |
parent | 4c0899659502d1ab14f30b02ec78261728caf9c8 (diff) |
Fix reception of (quoted) local-parts with embedded spaces. Bug 2025
Diffstat (limited to 'src')
-rw-r--r-- | src/src/smtp_in.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 9c647efda..8de12156d 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -1674,7 +1674,13 @@ uschar *n; uschar *v = smtp_cmd_data + Ustrlen(smtp_cmd_data) - 1; while (isspace(*v)) v--; v[1] = 0; -while (v > smtp_cmd_data && *v != '=' && !isspace(*v)) v--; +while (v > smtp_cmd_data && *v != '=' && !isspace(*v)) + { + /* Take care to not stop at a space embedded in a quoted local-part */ + + if (*v == '"') do v--; while (*v != '"' && v > smtp_cmd_data+1); + v--; + } n = v; if (*v == '=') |