From 021bdc5fc86e112614f3faf28c1b7615f2e18fdd Mon Sep 17 00:00:00 2001
From: Micke Nordin
Date: Thu, 14 Nov 2024 17:43:15 +0100
Subject: [PATCH] fix(settings): Fix settings name
In #901 it seems I got the name of the config key wrong in some places.
Signed-off-by: Micke Nordin
---
lib/Controller/SAMLController.php | 2 +-
lib/Controller/SettingsController.php | 2 +-
lib/SAMLSettings.php | 2 +-
templates/admin.php | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/Controller/SAMLController.php b/lib/Controller/SAMLController.php
index e2b58838..d0141a55 100644
--- a/lib/Controller/SAMLController.php
+++ b/lib/Controller/SAMLController.php
@@ -152,7 +152,7 @@ public function login(int $idp = 1): Http\RedirectResponse {
case 'saml':
$settings = $this->samlSettings->getOneLoginSettingsArray($idp);
$auth = new Auth($settings);
- $passthroughParamsString = trim($settings['idp-passthroughParameters'] ?? '') ;
+ $passthroughParamsString = trim($settings['idp']['passthroughParameters'] ?? '') ;
$passthroughParams = array_map('trim', explode(',', $passthroughParamsString));
$passthroughValues = [];
diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php
index 659ef90f..be3bfd5f 100644
--- a/lib/Controller/SettingsController.php
+++ b/lib/Controller/SettingsController.php
@@ -57,7 +57,7 @@ public function getSamlProviderSettings(int $providerId): array {
'singleSignOnService.url' => ['required' => false],
'entityId' => ['required' => false],
'x509cert' => ['required' => false],
- 'idp-passthroughParameters' => ['required' => false],
+ 'passthroughParameters' => ['required' => false],
];
/* Fetch all config values for the given providerId */
diff --git a/lib/SAMLSettings.php b/lib/SAMLSettings.php
index 23e0ef2a..d1063804 100644
--- a/lib/SAMLSettings.php
+++ b/lib/SAMLSettings.php
@@ -134,7 +134,6 @@ public function getOneLoginSettingsArray(int $idp): array {
'strict' => true,
'debug' => $this->config->getSystemValue('debug', false),
'baseurl' => $this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.base'),
- 'idp-passthroughParameters' => $this->configurations[$idp]['idp-passthroughParameters'] ?? '',
'security' => [
'nameIdEncrypted' => ($this->configurations[$idp]['security-nameIdEncrypted'] ?? '0') === '1',
'authnRequestsSigned' => ($this->configurations[$idp]['security-authnRequestsSigned'] ?? '0') === '1',
@@ -167,6 +166,7 @@ public function getOneLoginSettingsArray(int $idp): array {
'url' => $this->configurations[$idp]['idp-singleSignOnService.url'] ?? '',
],
'x509cert' => $this->configurations[$idp]['idp-x509cert'] ?? '',
+ 'passthroughParameters' => $this->configurations[$idp]['idp-passthroughParameters'] ?? '',
],
];
diff --git a/templates/admin.php b/templates/admin.php
index 5583f68c..7cda20d1 100644
--- a/templates/admin.php
+++ b/templates/admin.php
@@ -154,8 +154,8 @@
-
-
+
+