mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-09-21 06:12:56 -04:00
catch any stupid or lazy mistakes that could be made...
This commit is contained in:
@@ -244,7 +244,14 @@ void ClientConnection::validateClient(const std::string & id, const std::string
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorMessage err("Login Failed", j["userMessage"]);
|
||||
std::string errMsg = j["userMessage"];
|
||||
|
||||
if (errMsg.empty()) //prevent stupid mistakes
|
||||
{
|
||||
errMsg = "Error: authentication service provided no user message.";
|
||||
}
|
||||
|
||||
ErrorMessage err("Login Failed", errMsg);
|
||||
this->send(err, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user