Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable29] fix(auth): Keep redirect URL during 2FA setup and challenge #44977

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Apr 23, 2024

Backport of PR #44745

$params = [
'redirect_url' => $this->request->getParam('redirect_url'),
];
if (!isset($params['redirect_url']) && isset($this->request->server['REQUEST_URI'])) {

Check notice

Code scanning / Psalm

NoInterfaceProperties Note

Interfaces cannot have properties
@@ -230,7 +231,7 @@
* @NoCSRFRequired
*/
#[FrontpageRoute(verb: 'GET', url: 'login/setupchallenge/{providerId}')]
public function setupProvider(string $providerId) {
public function setupProvider(string $providerId, ?string $redirect_url = null) {

Check notice

Code scanning / Psalm

MissingReturnType Note

Method OC\Core\Controller\TwoFactorChallengeController::setupProvider does not have a return type, expecting OCP\AppFramework\Http\RedirectResponse<303, array<never, never>>|OCP\AppFramework\Http\StandaloneTemplateResponse<mixed, mixed>
@@ -264,11 +266,12 @@
* @todo handle the extreme edge case of an invalid provider ID and redirect to the provider selection page
*/
#[FrontpageRoute(verb: 'POST', url: 'login/setupchallenge/{providerId}')]
public function confirmProviderSetup(string $providerId) {
public function confirmProviderSetup(string $providerId, ?string $redirect_url = null) {

Check notice

Code scanning / Psalm

MissingReturnType Note

Method OC\Core\Controller\TwoFactorChallengeController::confirmProviderSetup does not have a return type, expecting OCP\AppFramework\Http\RedirectResponse<303, array<never, never>>
@Altahrim Altahrim mentioned this pull request Apr 23, 2024
25 tasks
This was referenced May 15, 2024
@blizzz blizzz mentioned this pull request Jun 11, 2024
3 tasks
@blizzz blizzz merged commit 464cfce into stable29 Jun 12, 2024
167 of 168 checks passed
@blizzz blizzz deleted the backport/44745/stable29 branch June 12, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants