Fix password verification by passing the peer object instead of UUID

This commit is contained in:
netkas 2025-03-28 13:53:32 -04:00
parent 0669f13493
commit fd480ec4ef
Signed by: netkas
GPG key ID: 4D8629441B76E4CC

View file

@ -3,6 +3,7 @@
namespace Socialbox\Classes\StandardMethods\Settings;
use Socialbox\Abstracts\Method;
use Socialbox\Classes\Logger;
use Socialbox\Enums\StandardError;
use Socialbox\Exceptions\CryptographyException;
use Socialbox\Exceptions\DatabaseOperationException;
@ -43,7 +44,7 @@
try
{
if (!PasswordManager::verifyPassword($request->getPeer()->getUuid(), $rpcRequest->getParameter('existing_password')))
if (!PasswordManager::verifyPassword($request->getPeer(), (string)$rpcRequest->getParameter('existing_password')))
{
return $rpcRequest->produceResponse(false);
}