Skip to content

Commit 0a9a14d

Browse files
authored
Merge pull request #51295 from nextcloud/backport/51280/stable31
[stable31] fix(login): Properly target public page with attribute
2 parents 5c0babe + fb41438 commit 0a9a14d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use OC\AppFramework\Utility\ControllerMethodReflector;
1111
use OC\Core\Controller\ClientFlowLoginV2Controller;
1212
use OCP\AppFramework\Controller;
13+
use OCP\AppFramework\Http\Attribute\PublicPage;
1314
use OCP\AppFramework\Middleware;
1415
use OCP\ISession;
1516
use OCP\IUserSession;
@@ -38,7 +39,7 @@ public function beforeController(Controller $controller, string $methodName) {
3839
}
3940

4041
$reflectionMethod = new ReflectionMethod($controller, $methodName);
41-
if (!empty($reflectionMethod->getAttributes('PublicPage'))) {
42+
if (!empty($reflectionMethod->getAttributes(PublicPage::class))) {
4243
return;
4344
}
4445

0 commit comments

Comments
 (0)