Mercurial > hg > nginx
diff src/imap/ngx_imap_parse.c @ 800:887d8dec72dc
APOP
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 23 Oct 2006 13:10:10 +0000 |
parents | 4e296b7d25bf |
children | da9c1521319d |
line wrap: on
line diff
--- a/src/imap/ngx_imap_parse.c Fri Oct 20 20:43:01 2006 +0000 +++ b/src/imap/ngx_imap_parse.c Mon Oct 23 13:10:10 2006 +0000 @@ -429,6 +429,10 @@ { s->command = NGX_POP3_PASS; + } else if (c0 == 'A' && c1 == 'P' && c2 == 'O' && c3 == 'P') + { + s->command = NGX_POP3_APOP; + } else if (c0 == 'Q' && c1 == 'U' && c2 == 'I' && c3 == 'T') { s->command = NGX_POP3_QUIT; @@ -496,12 +500,20 @@ case sw_argument: switch (ch) { - /* - * the space should be considered part of the at username - * or password, but not of argument in other commands - * - * case ' ': - */ + case ' ': + + /* + * the space should be considered as part of the at username + * or password, but not of argument in other commands + */ + + if (s->command == NGX_POP3_USER + || s->command == NGX_POP3_PASS) + { + break; + } + + /* fall through */ case CR: case LF: