Memory leak in OAuthServerException.php
Closed this issue · 1 comments
ThamanVelasquezBice commented
I am unsure if this is related to this package or Laravel passport in general. I followed the install instructions and went to test a random route with the auth middleware. I received this error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /Users/thaman/Documents/Code/my-project/vendor/league/oauth2-server/src/Exception/OAuthServerException.php on line 173
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /Users/thaman/Documents/Code/my-project/vendor/symfony/debug/Exception/FatalErrorException.php on line 1
this is the function located in that file on that line:
public static function accessDenied($hint = null, $redirectUri = null)
{
return new static(
'The resource owner or authorization server denied the request.',
9,
'access_denied',
401,
$hint,
$redirectUri
);
}
I am on Lumen 5.4
ThamanVelasquezBice commented
More details: it only happens when the route is hit without proper authentication. An example would be with having an incorrect access_token.
It was referenced a while back in the oauth2-server package that Passport uses: thephpleague/oauth2-server#784