did i say simpler? i'm not sure if this is more or less simple...but it is secure and operates how we need... @apathy audit please?

This commit is contained in:
DarthArgus
2016-08-05 01:09:25 +00:00
parent 46e985f72a
commit a9fa196e5f
4 changed files with 27 additions and 14 deletions
@@ -182,16 +182,16 @@ void ClientConnection::validateClient(const std::string & id, const std::string
std::ostringstream postBuf;
postBuf << "user_name=" << id << "&user_password=" << key << "&ip=" << getRemoteAddress();
const std::string response = webAPI::simplePost(authURL, std::string(postBuf.str()), "username", "message");
const webAPI::statusMessage response = webAPI::simplePost(authURL, std::string(postBuf.str()), "username", "message", "status", "success");
if (!response.empty())
if (response.status && !response.message.empty())
{
authOK = 1;
uname = response;
uname = response.message;
}
else
{
ErrorMessage err("Login Failed", response);
ErrorMessage err("Login Failed", response.message);
this->send(err, true);
}
}