X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fsmtp%2Fserv_smtp.c;fp=citadel%2Fmodules%2Fsmtp%2Fserv_smtp.c;h=69a4c77ef43b3148d2210815cc22989bfd9f450d;hp=e40e4c7edca5e97492850ecf5c7a73c0648642a8;hb=fb2674ca5e32c68f8a2b98ad65ab9b668fe6e578;hpb=6a40bef83342b4519b9231ce67ad92eaef537574 diff --git a/citadel/modules/smtp/serv_smtp.c b/citadel/modules/smtp/serv_smtp.c index e40e4c7ed..69a4c77ef 100644 --- a/citadel/modules/smtp/serv_smtp.c +++ b/citadel/modules/smtp/serv_smtp.c @@ -411,10 +411,10 @@ void smtp_auth(long offset, long Flags) return; } - extract_token(method, ChrPtr(sSMTP->Cmd), 0, ' ', sizeof method); + extract_token(method, ChrPtr(sSMTP->Cmd) + offset, 0, ' ', sizeof method); if (!strncasecmp(method, "login", 5) ) { - if (StrLength(sSMTP->Cmd) >= 7) { + if (StrLength(sSMTP->Cmd) - offset >= 7) { smtp_get_user(6); } else { @@ -427,18 +427,18 @@ void smtp_auth(long offset, long Flags) if (!strncasecmp(method, "plain", 5) ) { long len; - if (num_tokens(ChrPtr(sSMTP->Cmd), ' ') < 2) { + if (num_tokens(ChrPtr(sSMTP->Cmd) + offset, ' ') < 2) { cprintf("334 \r\n"); SMTP->command_state = smtp_plain; return; } len = extract_token(encoded_authstring, - ChrPtr(sSMTP->Cmd), + ChrPtr(sSMTP->Cmd) + offset, 1, ' ', sizeof encoded_authstring); StrBufPlain(sSMTP->Cmd, encoded_authstring, len); - smtp_try_plain(offset, Flags); + smtp_try_plain(0, Flags); return; }