diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-10-23 13:10:10 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2006-10-23 13:10:10 +0000 |
commit | abeb122d6e447f03be252094e857bf6d5611de19 (patch) | |
tree | 2c02436c62314dd4e47682f80970ed6f7507b73a /src/imap/ngx_imap_parse.c | |
parent | 73c80d82c1c7c1e8f1eb416ed378a2d541c9675b (diff) | |
download | nginx-abeb122d6e447f03be252094e857bf6d5611de19.tar.gz nginx-abeb122d6e447f03be252094e857bf6d5611de19.zip |
APOP
Diffstat (limited to 'src/imap/ngx_imap_parse.c')
-rw-r--r-- | src/imap/ngx_imap_parse.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/imap/ngx_imap_parse.c b/src/imap/ngx_imap_parse.c index eea4550a8..6256cc863 100644 --- a/src/imap/ngx_imap_parse.c +++ b/src/imap/ngx_imap_parse.c @@ -429,6 +429,10 @@ ngx_int_t ngx_pop3_parse_command(ngx_imap_session_t *s) { 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 @@ ngx_int_t ngx_pop3_parse_command(ngx_imap_session_t *s) 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: |