Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/user_saml.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-04-11 13:24:45 +0300
committerGitHub <noreply@github.com>2022-04-11 13:24:45 +0300
commit8cc470e182abaca2103400309a83d34dd266dcdc (patch)
treee04bcfa5a03846c0788d15444460d36754621480 /lib
parent18fa8a11f28f1363e6acab5cde8b5c695a56d2d9 (diff)
parentb91b85f417bff778345e6e1bd05f7a01434b5399 (diff)
Merge pull request #588 from nextcloud/bugfix/noid/relaystate
Set proper relaystate url
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/SAMLController.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Controller/SAMLController.php b/lib/Controller/SAMLController.php
index 4f354307..14f19967 100644
--- a/lib/Controller/SAMLController.php
+++ b/lib/Controller/SAMLController.php
@@ -172,7 +172,8 @@ class SAMLController extends Controller {
switch ($type) {
case 'saml':
$auth = new Auth($this->samlSettings->getOneLoginSettingsArray($idp));
- $ssoUrl = $auth->login(null, [], false, false, true);
+ $returnUrl = $this->request->getParam('originalUrl', $this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.login'));
+ $ssoUrl = $auth->login($returnUrl, [], false, false, true);
$response = new Http\RedirectResponse($ssoUrl);
// Small hack to make user_saml work with the loginflows
@@ -359,7 +360,7 @@ class SAMLController extends Controller {
return $response;
}
- $originalUrl = $data['OriginalUrl'];
+ $originalUrl = $data['RelayState'] ?? $data['OriginalUrl'];
if ($originalUrl !== null && $originalUrl !== '') {
$response = new Http\RedirectResponse($originalUrl);
} else {