diff options
author | Louis Chemineau <louis@chmn.me> | 2025-02-27 13:13:26 +0100 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2025-03-03 11:42:43 +0100 |
commit | 0c809ccc7fc8e1c29ccb25ca6f6351978920ab42 (patch) | |
tree | 07d516ec52bd67cc9dbe6824206689c49682c537 /lib | |
parent | a25a8f4f53b2157ecd5a82da5dd5e6b869e958cf (diff) | |
download | nextcloud-server-backport/51051/stable30.tar.gz nextcloud-server-backport/51051/stable30.zip |
fix(login): Support subfolder install for ephemeral sessionsbackport/51051/stable30
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Authentication/Login/FlowV2EphemeralSessionsCommand.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Authentication/Login/FlowV2EphemeralSessionsCommand.php b/lib/private/Authentication/Login/FlowV2EphemeralSessionsCommand.php index b215df1523f..82dd829334d 100644 --- a/lib/private/Authentication/Login/FlowV2EphemeralSessionsCommand.php +++ b/lib/private/Authentication/Login/FlowV2EphemeralSessionsCommand.php @@ -10,15 +10,18 @@ namespace OC\Authentication\Login; use OC\Core\Controller\ClientFlowLoginV2Controller; use OCP\ISession; +use OCP\IURLGenerator; class FlowV2EphemeralSessionsCommand extends ALoginCommand { public function __construct( private ISession $session, + private IURLGenerator $urlGenerator, ) { } public function process(LoginData $loginData): LoginResult { - if (str_starts_with($loginData->getRedirectUrl() ?? '', '/login/v2/grant')) { + $loginV2GrantRoute = $this->urlGenerator->linkToRoute('core.ClientFlowLoginV2.grantPage'); + if (str_starts_with($loginData->getRedirectUrl() ?? '', $loginV2GrantRoute)) { $this->session->set(ClientFlowLoginV2Controller::EPHEMERAL_NAME, true); } |