diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2006-07-27 11:29:32 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2006-07-27 11:29:32 +0000 |
commit | 084efe8d7243ef5184443e2c7075e80074476703 (patch) | |
tree | 66356b34d557beaa18fda8abad4ce3e46ae2a4c4 /src | |
parent | 9ecb03f392a171ae1f3f945e783c5d2c3b847c29 (diff) |
Exim was not testing for a space following SMTP commands such as EHLO
that require one. Thus, EHLORHUBARB was interpreted as a valid command.
This bug exists in every version of Exim that I still have, right back
to 0.12.
Diffstat (limited to 'src')
-rw-r--r-- | src/src/smtp_in.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 531eaabe4..3b1f6a33e 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/smtp_in.c,v 1.40 2006/07/27 10:13:52 ph10 Exp $ */ +/* $Cambridge: exim/src/src/smtp_in.c,v 1.41 2006/07/27 11:29:32 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -523,7 +523,10 @@ if required. */ for (p = cmd_list; p < cmd_list_end; p++) { - if (strncmpic(smtp_cmd_buffer, US p->name, p->len) == 0) + if (strncmpic(smtp_cmd_buffer, US p->name, p->len) == 0 && + (smtp_cmd_buffer[p->len-1] == ':' || /* "mail from:" or "rcpt to:" */ + smtp_cmd_buffer[p->len] == 0 || + smtp_cmd_buffer[p->len] == ' ')) { if (smtp_inptr < smtp_inend && /* Outstanding input */ p->cmd < sync_cmd_limit && /* Command should sync */ |