fix(login): Properly target public page with attribute

Signed-off-by: Louis Chemineau <louis@chmn.me>
pull/51295/head
Louis Chemineau 2025-03-05 12:49:28 +07:00 committed by backportbot[bot]
parent 5c0babe27b
commit fb41438db1
1 changed files with 2 additions and 1 deletions

@ -10,6 +10,7 @@ namespace OC\AppFramework\Middleware;
use OC\AppFramework\Utility\ControllerMethodReflector;
use OC\Core\Controller\ClientFlowLoginV2Controller;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Middleware;
use OCP\ISession;
use OCP\IUserSession;
@ -38,7 +39,7 @@ class FlowV2EphemeralSessionsMiddleware extends Middleware {
}
$reflectionMethod = new ReflectionMethod($controller, $methodName);
if (!empty($reflectionMethod->getAttributes('PublicPage'))) {
if (!empty($reflectionMethod->getAttributes(PublicPage::class))) {
return;
}