Merge pull request #51295 from nextcloud/backport/51280/stable31

[stable31] fix(login): Properly target public page with attribute
This commit is contained in:
Louis 2025-03-05 18:45:16 +01:00 committed by GitHub
commit 0a9a14d319
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}