Merge pull request #525 from nextcloud/slo-web-server-decode
Allow setting of "retrieveParametersFromServer"
This commit is contained in:
commit
7e232620c8
|
@ -418,8 +418,14 @@ class SAMLController extends Controller {
|
|||
$stay = true ; // $auth will return the redirect URL but won't perform the redirect himself
|
||||
if ($isFromIDP) {
|
||||
$keepLocalSession = true ; // do not let processSLO to delete the entire session. Let userSession->logout do the job
|
||||
$targetUrl = $auth->processSLO($keepLocalSession, null, false, null, $stay);
|
||||
|
||||
$targetUrl = $auth->processSLO(
|
||||
$keepLocalSession,
|
||||
null,
|
||||
$this->SAMLSettings->usesSloWebServerDecode(),
|
||||
null,
|
||||
$stay
|
||||
);
|
||||
|
||||
$errors = $auth->getErrors();
|
||||
if (!empty($errors)) {
|
||||
foreach($errors as $error) {
|
||||
|
|
|
@ -88,6 +88,10 @@ class SAMLSettings {
|
|||
return ($setting === '1' && $type === 'saml');
|
||||
}
|
||||
|
||||
public function usesSloWebServerDecode() : bool {
|
||||
return $this->config->getAppValue('user_saml', 'security-sloWebServerDecode', '0') === '1';
|
||||
}
|
||||
|
||||
/**
|
||||
* get config for given IDP
|
||||
*
|
||||
|
|
|
@ -90,7 +90,8 @@ class Admin implements ISettings {
|
|||
'signatureAlgorithm' => [
|
||||
'type' => 'line',
|
||||
'text' => $this->l10n->t('Algorithm that the toolkit will use on signing process.')
|
||||
]
|
||||
],
|
||||
'sloWebServerDecode' => $this->l10n->t('Retrieve query parameters from $_SERVER. Some SAML servers require this on SLO requests.'),
|
||||
];
|
||||
$generalSettings = [
|
||||
'uid_mapping' => [
|
||||
|
|
|
@ -83,7 +83,8 @@ class AdminTest extends \Test\TestCase {
|
|||
'signatureAlgorithm' => [
|
||||
'type' => 'line',
|
||||
'text' => 'Algorithm that the toolkit will use on signing process.'
|
||||
]
|
||||
],
|
||||
'sloWebServerDecode' => 'Retrieve query parameters from $_SERVER. Some SAML servers require this on SLO requests.',
|
||||
];
|
||||
$generalSettings = [
|
||||
'idp0_display_name' => [
|
||||
|
|
Loading…
Reference in New Issue