return;
}
- if (CtdlLoginExistingUser(parms[2]) == login_ok) {
+ if (CtdlLoginExistingUser(NULL, parms[2]) == login_ok) {
if (CtdlTryPassword(parms[3]) == pass_ok) {
cprintf("%s OK [", parms[0]);
imap_output_capability_string();
}
if (!strcasecmp(parms[2], "PLAIN")) {
- CtdlEncodeBase64(buf, "Username:", 9);
- cprintf("+ %s\r\n", buf);
+ // CtdlEncodeBase64(buf, "Username:", 9);
+ // cprintf("+ %s\r\n", buf);
+ cprintf("+ \r\n");
IMAP->authstate = imap_as_expecting_plainauth;
strcpy(IMAP->authseq, parms[0]);
return;
char ident[256];
char user[256];
char pass[256];
+ int result;
CtdlDecodeBase64(decoded_authstring, cmd, strlen(cmd));
safestrncpy(ident, decoded_authstring, sizeof ident);
safestrncpy(pass, &decoded_authstring[strlen(ident) + strlen(user) + 2], sizeof pass);
IMAP->authstate = imap_as_normal;
- if (CtdlLoginExistingUser(user) == login_ok) {
+
+ if (strlen(ident) > 0) {
+ result = CtdlLoginExistingUser(user, ident);
+ }
+ else {
+ result = CtdlLoginExistingUser(NULL, user);
+ }
+
+ if (result == login_ok) {
if (CtdlTryPassword(pass) == pass_ok) {
cprintf("%s OK authentication succeeded\r\n", IMAP->authseq);
return;
char buf[SIZ];
CtdlDecodeBase64(buf, cmd, SIZ);
- CtdlLoginExistingUser(buf);
+ CtdlLoginExistingUser(NULL, buf);
CtdlEncodeBase64(buf, "Password:", 9);
cprintf("+ %s\r\n", buf);
IMAP->authstate = imap_as_expecting_password;
NULL, imaps_greeting, imap_command_loop, NULL);
#endif
CtdlRegisterSessionHook(imap_cleanup_function, EVT_STOP);
+
+ /* return our Subversion id for the Log */
return "$Id$";
}