]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/imap/serv_imap.c
* if we fail to log in because of user/passvoid wrong, reply with NO instead of BAD
[citadel.git] / citadel / modules / imap / serv_imap.c
index 5ddae608a15b3beb450efd062779376e2143df50..27c0da4ccbb424f7082b728972d2310d344d7400 100644 (file)
@@ -556,6 +556,11 @@ void imap_login(int num_parms, ConstStr *Params)
                                cprintf("] Hello, %s\r\n", CC->user.fullname);
                                return;
                        }
+                       else
+                       {
+                               cprintf("%s NO AUTHENTICATE %s failed\r\n",
+                                       Params[0].Key, Params[3].Key);
+                       }
                }
 
                cprintf("%s BAD Login incorrect\r\n", Params[0].Key);
@@ -1426,7 +1431,7 @@ void imap_command_loop(void)
                CtdlLogPrintf(CTDL_INFO, "IMAP: <plain_auth>\n");
        }
        else if ((Imap->authstate == imap_as_expecting_multilineusername) || 
-                bmstrcasestr(ChrPtr(Imap->Cmd.CmdBuf), " LOGIN ")) {
+                cbmstrcasestr(ChrPtr(Imap->Cmd.CmdBuf), " LOGIN ")) {
                CtdlLogPrintf(CTDL_INFO, "IMAP: LOGIN...\n");
        }
        else {