Skip to content

Commit 021bdc5

Browse files
committed
fix(settings): Fix settings name
In nextcloud#901 it seems I got the name of the config key wrong in some places. Signed-off-by: Micke Nordin <kano@sunet.se>
1 parent 3f0b8bd commit 021bdc5

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lib/Controller/SAMLController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function login(int $idp = 1): Http\RedirectResponse {
152152
case 'saml':
153153
$settings = $this->samlSettings->getOneLoginSettingsArray($idp);
154154
$auth = new Auth($settings);
155-
$passthroughParamsString = trim($settings['idp-passthroughParameters'] ?? '') ;
155+
$passthroughParamsString = trim($settings['idp']['passthroughParameters'] ?? '') ;
156156
$passthroughParams = array_map('trim', explode(',', $passthroughParamsString));
157157

158158
$passthroughValues = [];

lib/Controller/SettingsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function getSamlProviderSettings(int $providerId): array {
5757
'singleSignOnService.url' => ['required' => false],
5858
'entityId' => ['required' => false],
5959
'x509cert' => ['required' => false],
60-
'idp-passthroughParameters' => ['required' => false],
60+
'passthroughParameters' => ['required' => false],
6161
];
6262
/* Fetch all config values for the given providerId */
6363

lib/SAMLSettings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ public function getOneLoginSettingsArray(int $idp): array {
134134
'strict' => true,
135135
'debug' => $this->config->getSystemValue('debug', false),
136136
'baseurl' => $this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.base'),
137-
'idp-passthroughParameters' => $this->configurations[$idp]['idp-passthroughParameters'] ?? '',
138137
'security' => [
139138
'nameIdEncrypted' => ($this->configurations[$idp]['security-nameIdEncrypted'] ?? '0') === '1',
140139
'authnRequestsSigned' => ($this->configurations[$idp]['security-authnRequestsSigned'] ?? '0') === '1',
@@ -167,6 +166,7 @@ public function getOneLoginSettingsArray(int $idp): array {
167166
'url' => $this->configurations[$idp]['idp-singleSignOnService.url'] ?? '',
168167
],
169168
'x509cert' => $this->configurations[$idp]['idp-x509cert'] ?? '',
169+
'passthroughParameters' => $this->configurations[$idp]['idp-passthroughParameters'] ?? '',
170170
],
171171
];
172172

templates/admin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@
154154
<textarea id="user-saml-x509cert" name="x509cert"><?php p($_['config']['idp-x509cert'] ?? '') ?></textarea>
155155
</p>
156156
<p>
157-
<label class="user-saml-standalone-label" for="user-saml-idp-passthroughParameters"><?php p($l->t('Request parameters to pass-through to IdP (comma separated list)')) ?></label><br/>
158-
<input id="user-saml-idp-passthroughParameters" name="idp-passthroughParameters" value="<?php p($_['config']['idp-passthroughParameters'] ?? '') ?>" type="text" placeholder="idp_hint,extra_parameter"/>
157+
<label class="user-saml-standalone-label" for="user-saml-passthroughParameters"><?php p($l->t('Request parameters to pass-through to IdP (comma separated list)')) ?></label><br/>
158+
<input id="user-saml-passthroughParameters" data-key="idp-passthroughParameters" name="passthroughParameters" value="<?php p($_['config']['idp-passthroughParameters'] ?? '') ?>" type="text" placeholder="idp_hint,extra_parameter"/>
159159
</p>
160160
</div>
161161
</div>

0 commit comments

Comments
 (0)