mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-25 18:30:55 -06:00
Log file security.
This commit is contained in:
parent
62b3986fcd
commit
15f8cd49d3
@ -49,8 +49,8 @@ trait VerifiesAccessToken
|
||||
*/
|
||||
protected function verifyAccessToken(): bool
|
||||
{
|
||||
$userId = intval($this->option('user'));
|
||||
$token = strval($this->option('token'));
|
||||
$userId = (int)$this->option('user');
|
||||
$token = (int)$this->option('token');
|
||||
/** @var UserRepositoryInterface $repository */
|
||||
$repository = app(UserRepositoryInterface::class);
|
||||
$user = $repository->find($userId);
|
||||
@ -68,7 +68,7 @@ trait VerifiesAccessToken
|
||||
}
|
||||
if (!($accessToken->data === $token)) {
|
||||
Log::error(sprintf('Invalid access token for user #%d.', $userId));
|
||||
Log::error(sprintf('Token given is "%s", expected "%s".', $token, $accessToken->data));
|
||||
Log::error(sprintf('Token given is "%s", expected something else.', $token));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user