Recent fix additional fix.
This commit is contained in:
parent
7298c37f44
commit
b51d2f1a6e
|
@ -80,6 +80,7 @@ class AbstractApi
|
||||||
public function sendPostRequest($path, array $parameters = [])
|
public function sendPostRequest($path, array $parameters = [])
|
||||||
{
|
{
|
||||||
// Cleaning POST parameters from potential @file injections
|
// Cleaning POST parameters from potential @file injections
|
||||||
|
// @todo move to new Guzzle
|
||||||
array_walk($parameters, function (string &$value, string $key) {
|
array_walk($parameters, function (string &$value, string $key) {
|
||||||
$value = str_replace('@', '', $value);
|
$value = str_replace('@', '', $value);
|
||||||
});
|
});
|
||||||
|
|
|
@ -207,12 +207,12 @@ class PrivateMessageProcessor
|
||||||
|
|
||||||
private function linkAccount(Account $account, string $login, string $password): bool
|
private function linkAccount(Account $account, string $login, string $password): bool
|
||||||
{
|
{
|
||||||
if ($this->userApi->isAuthDataValid($login, $password)) {
|
/** @var User $user */
|
||||||
/** @var User $user */
|
if (null === $user = $this->userRepo->findUserByLogin($login)) {
|
||||||
if (null === $user = $this->userRepo->findUserByLogin($login)) {
|
throw new CommandProcessingException('User not found in Point Tools database. Please try again later.');
|
||||||
throw new CommandProcessingException('User not found in Point Tools database. Please try again later.');
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
if ($this->userApi->isAuthDataValid($login, $password)) {
|
||||||
$account->setUser($user);
|
$account->setUser($user);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue