fix(oauth2): Add missing urlencode for failure redirection

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2026-03-19 11:50:46 +01:00 committed by backportbot[bot]
parent a8a46aa576
commit f25bb40dd0

View file

@ -81,7 +81,7 @@ class LoginRedirectorController extends Controller {
if ($response_type !== 'code') {
//Fail
$url = $client->getRedirectUri() . '?error=unsupported_response_type&state=' . $state;
$url = $client->getRedirectUri() . '?error=unsupported_response_type&state=' . \urlencode($state);
return new RedirectResponse($url);
}