1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-19 06:50:07 +03:00

Bug #963: RequestManagerUser checks the parameter types before the User object is locked

This commit is contained in:
Carlos Martín 2011-12-19 09:06:18 -08:00
parent 0171c28d92
commit ba91887f8b

View File

@ -31,7 +31,7 @@ void RequestManagerUser::
return;
}
user = static_cast<User *>(pool->get(id,true));
user = static_cast<User *>(pool->get(id,false));
if ( user == 0 )
{
@ -61,6 +61,8 @@ int UserChangePassword::user_action(User * user,
string new_pass = xmlrpc_c::value_string(paramList.getString(2));
user->lock();
if (user->get_auth_driver() == UserPool::CORE_AUTH)
{
new_pass = SSLTools::sha1_digest(new_pass);
@ -90,6 +92,8 @@ int UserChangeAuth::user_action(User * user,
int rc = 0;
user->lock();
if ( !new_pass.empty() )
{
if ( new_auth == UserPool::CORE_AUTH)