Compiles but lotsa problems.

This commit is contained in:
Brad Arant committed 2022-07-30 17:46:35 -07:00
1 parent 09c6163a74
commit bb1c2cf944
9 files changed
+50 -49

No files matched your search

+11 -10
View File
@@ -9,16 +9,16 @@ namespace mail {
switch(session.authState) {
case USER_UNKNOWN:
if(request[1].equals("LOGIN")) {
session.out << "334 VXNlcm5hbWU6" << CRLF;
if(request[1].equals("LOGIN")) {
session.out << "334 VXNlcm5hbWU6" << CRLF;
// setTimer(10.0f);
session.authState = USER_QUERY;
grabInput(session);
}
else {
session.out << "504 AUTH method not supported." << CRLF;
}
return 1;
session.authState = USER_QUERY;
grabInput(session);
}
else {
session.out << "504 AUTH method not supported." << CRLF;
}
return 1;
case USER_QUERY:
session.userName = request[0];
@@ -47,7 +47,8 @@ namespace mail {
}
bool __SMTP_AUTH::authLogin(coreutils::ZString &userName, coreutils::ZString &password, SMTPServer &server) {
std::string secretPath = server.mailFileSystem.getMailBoxPath(userName) + "/.password";
coreutils::MString secretPath;
secretPath << server.mailFileSystem.getMailBoxPath(userName) << "/.password";
coreutils::File secret(secretPath);
secret.read();
return password == secret.asString();