X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fpop3%2Fserv_pop3.c;h=89bfef80ec181e864b0ecc565a02c5d2e2f51217;hb=c37006aac2a4cc8a31643883b2e8d128441a5069;hp=fe67455e1a4dc667e0a2e2ec3c2c63d4720962d2;hpb=8d702a17f284ebdc7875b911abe7eadc1cc3d96a;p=citadel.git diff --git a/citadel/modules/pop3/serv_pop3.c b/citadel/modules/pop3/serv_pop3.c index fe67455e1..89bfef80e 100644 --- a/citadel/modules/pop3/serv_pop3.c +++ b/citadel/modules/pop3/serv_pop3.c @@ -98,8 +98,7 @@ void pop3_greeting(void) { CC->session_specific_data = malloc(sizeof(struct citpop3)); memset(POP3, 0, sizeof(struct citpop3)); - cprintf("+OK Citadel POP3 server %s\r\n", - CC->cs_nonce); + cprintf("+OK Citadel POP3 server ready.\r\n"); } @@ -221,60 +220,6 @@ void pop3_login(void) } -void pop3_apop(char *argbuf) -{ - char username[SIZ]; - char userdigest[MD5_HEXSTRING_SIZE]; - char realdigest[MD5_HEXSTRING_SIZE]; - char *sptr; - - if (CC->logged_in) - { - cprintf("-ERR You are already logged in; not in the AUTHORIZATION phase.\r\n"); - return; - } - - if ((sptr = strchr(argbuf, ' ')) == NULL) - { - cprintf("-ERR Invalid APOP line.\r\n"); - return; - } - - *sptr++ = '\0'; - - while ((*sptr) && isspace(*sptr)) - sptr++; - - strncpy(username, argbuf, sizeof(username)-1); - username[sizeof(username)-1] = '\0'; - - memset(userdigest, 0, MD5_HEXSTRING_SIZE); - strncpy(userdigest, sptr, MD5_HEXSTRING_SIZE-1); - - if (CtdlLoginExistingUser(NULL, username) != login_ok) - { - cprintf("-ERR No such user.\r\n"); - return; - } - - if (CtdlGetUser(&CC->user, CC->curr_user)) - { - cprintf("-ERR No such user.\r\n"); - return; - } - - make_apop_string(CC->user.password, CC->cs_nonce, realdigest, sizeof realdigest); - if (!strncasecmp(realdigest, userdigest, MD5_HEXSTRING_SIZE-1)) - { - do_login(); - pop3_login(); - } - else - { - cprintf("-ERR That is NOT the password.\r\n"); - } -} - /* * Authorize with password (implements POP3 "PASS" command) @@ -659,11 +604,6 @@ void pop3_command_loop(void) { pop3_pass(&cmdbuf[5]); } - else if (!strncasecmp(cmdbuf, "APOP", 4)) - { - pop3_apop(&cmdbuf[5]); - } - #ifdef HAVE_OPENSSL else if (!strncasecmp(cmdbuf, "STLS", 4)) { pop3_stls();