#include "__POP3_USER.h" #include "POP3Server.h" namespace mail { // RFC 1939 7: USER only records the pending username - it does NOT // check whether the user exists (deferred to PASS), so a client // probing usernames can't distinguish "no such user" from "wrong // password" by watching this response alone. int __POP3_USER::processCommand(coreutils::ZString request, POP3Session &session, POP3Server &server) { request.skipWhitespace(); coreutils::ZString nameArg = request.getTokenExclude(" "); if (nameArg.getLength() == 0) { session.out << "-ERR Usage: USER " << CRLF; return 1; } session.userName = nameArg.str(); session.authenticated = false; session.out << "+OK" << CRLF; return 1; } }