Skip to content
Snippets Groups Projects
Commit f4c9a66a authored by rswindell's avatar rswindell
Browse files

Allows up to three non-USER commands in authentication state (RFC 2449).

parent 41d53572
No related branches found
No related tags found
No related merge requests found
......@@ -677,10 +677,15 @@ static void pop3_thread(void* arg)
sockprintf(socket,"+OK Synchronet POP3 Server for %s v%s Ready"
,PLATFORM_DESC,MAIL_VERSION);
if(!sockgetrsp(socket,"USER ",buf,sizeof(buf))) {
/* Requires USER command first */
for(i=3;i;i--) {
if(sockgetrsp(socket,"USER ",buf,sizeof(buf)))
break;
sockprintf(socket,"-ERR USER command expected");
break;
}
if(!i) /* no USER command received */
break;
p=buf+5;
while(*p && *p<=' ') p++;
SAFECOPY(username,p);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment