1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

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

This commit is contained in:
Ruben S. Montero 2016-09-08 17:26:42 +02:00
parent 5680c1d494
commit 67f58e1058

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);