Merge branch 'master' of ssh://**REDACTED**/~/_C++/gradido_login_server

This commit is contained in:
Dario 2019-10-10 06:32:59 +02:00
commit 39b5852049
5 changed files with 10 additions and 5 deletions

@ -1 +1 @@
Subproject commit 7307ffb8a89d2459f0c07ea5cab27c0d3496df00 Subproject commit a0977c22d23f7e8cb596f1d9d812de74115f407b

View File

@ -38,6 +38,7 @@ Poco::Net::HTTPRequestHandler* PageRequestHandlerFactory::createRequestHandler(c
} }
if (url_first_part == "/elopage_webhook_261") { if (url_first_part == "/elopage_webhook_261") {
printf("choose elopage\n");
return new ElopageWebhook; return new ElopageWebhook;
} }

View File

@ -130,7 +130,7 @@ namespace ServerConfig {
} }
} }
void writeToFile(std::istream& datas, std::string& fileName) void writeToFile(std::istream& datas, std::string fileName)
{ {
static Poco::Mutex mutex; static Poco::Mutex mutex;

View File

@ -36,7 +36,7 @@ namespace ServerConfig {
bool initEMailAccount(const Poco::Util::LayeredConfiguration& cfg); bool initEMailAccount(const Poco::Util::LayeredConfiguration& cfg);
bool initSSLClientContext(); bool initSSLClientContext();
void writeToFile(std::istream& datas, std::string& fileName); void writeToFile(std::istream& datas, std::string fileName);
void unload(); void unload();
}; };

View File

@ -298,11 +298,15 @@ bool Session::isPwdValid(const std::string& pwd)
bool Session::loadUser(const std::string& email, const std::string& password) bool Session::loadUser(const std::string& email, const std::string& password)
{ {
Profiler usedTime; //Profiler usedTime;
if (email == "" || password == "") {
addError(new Error("Login", "Benutzernamen und Passwort müssen angegeben werden!"));
return false;
}
if (mSessionUser) mSessionUser = nullptr; if (mSessionUser) mSessionUser = nullptr;
mSessionUser = new User(email.data()); mSessionUser = new User(email.data());
if (!mSessionUser->validatePwd(password)) { if (!mSessionUser->validatePwd(password)) {
addError(new Error("Login", "E-Mail oder Passwort nicht korrekt, bitte versuche es erneut")); addError(new Error("Login", "E-Mail oder Passwort nicht korrekt, bitte versuche es erneut!"));
return false; return false;
} }
detectSessionState(); detectSessionState();