Skip to content

Commit b57259f

Browse files
committed
The auth storage should always check if the HTTP request is valid
1 parent 7b74b7d commit b57259f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ZfrOAuth2Module/Server/Authentication/Storage/AccessTokenStorage.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ private function getCurrentRequest()
8282
{
8383
$request = $this->application->getMvcEvent()->getRequest();
8484

85-
return $request instanceof Request ? $request : null;
85+
if (! $request instanceof Request || ! $this->resourceServer->isRequestValid($request)) {
86+
return null;
87+
}
88+
89+
return $request;
8690
}
8791
}

0 commit comments

Comments
 (0)