F #4714: Reset all user tokens when no token is set and valid == 0

This commit is contained in:
Ruben S. Montero committed 2016-09-09 10:24:41 +02:00
1 parent 5680c1d494
commit 67f58e1058
1 file changed
+5 -1
+5 -1
View File
@@ -488,7 +488,11 @@ void UserLogin::request_execute(xmlrpc_c::paramList const& paramList,
if (valid == 0) //Reset token
{
if ( user->login_tokens.reset(token) != 0 )
if ( token.empty() )
{
user->login_tokens.reset();
}
else if ( user->login_tokens.reset(token) != 0 )
{
att.resp_msg = "Could not find token: " + token;
failure_response(XML_RPC_API, att);