mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
LSauthMethod::CAS: fix support of phpCAS >= 1.6.0 and patched Debian Buster 1.3.6-1+deb10u1 version
This commit is contained in:
parent
5376435d8b
commit
fde66b2335
1 changed files with 18 additions and 2 deletions
|
@ -41,13 +41,29 @@ class LSauthMethod_CAS extends LSauthMethod {
|
||||||
phpCAS::setDebug(PHP_CAS_DEBUG_FILE);
|
phpCAS::setDebug(PHP_CAS_DEBUG_FILE);
|
||||||
}
|
}
|
||||||
self :: log_debug('LSauthMethod_CAS : initialise phpCAS :: client with CAS server URL https://'.LSAUTH_CAS_SERVER_HOSTNAME.':'.LSAUTH_CAS_SERVER_PORT.(defined('LSAUTH_CAS_SERVER_URI')?LSAUTH_CAS_SERVER_URI: ''));
|
self :: log_debug('LSauthMethod_CAS : initialise phpCAS :: client with CAS server URL https://'.LSAUTH_CAS_SERVER_HOSTNAME.':'.LSAUTH_CAS_SERVER_PORT.(defined('LSAUTH_CAS_SERVER_URI')?LSAUTH_CAS_SERVER_URI: ''));
|
||||||
phpCAS::client (
|
|
||||||
|
|
||||||
|
$phpcas_client_init_args = array(
|
||||||
constant(LSAUTH_CAS_VERSION),
|
constant(LSAUTH_CAS_VERSION),
|
||||||
LSAUTH_CAS_SERVER_HOSTNAME,
|
LSAUTH_CAS_SERVER_HOSTNAME,
|
||||||
LSAUTH_CAS_SERVER_PORT,
|
LSAUTH_CAS_SERVER_PORT,
|
||||||
(defined('LSAUTH_CAS_SERVER_URI')?LSAUTH_CAS_SERVER_URI: ''),
|
(defined('LSAUTH_CAS_SERVER_URI')?LSAUTH_CAS_SERVER_URI: ''),
|
||||||
false
|
|
||||||
);
|
);
|
||||||
|
// Determine phpCAS version to correctly handle the $service_base_url parameter added in 1.6.0.
|
||||||
|
// Note: this parameter is also required for Debian Buster 1.3.6-1+deb10u1 package, because
|
||||||
|
// to fix CVE-2022-39369, this version was patched and this parameter have been added. Check
|
||||||
|
// if CAS_Client::getServiceBaseUrl() exists to detect this case.
|
||||||
|
if (
|
||||||
|
intval(str_replace('.', '000', phpCAS::getVersion()).'000') >= 100060000000
|
||||||
|
|| method_exists('CAS_Client', 'getServiceBaseUrl')
|
||||||
|
)
|
||||||
|
$phpcas_client_init_args[] = LSurl :: get_public_absolute_url('/');
|
||||||
|
|
||||||
|
// Parameter $changeSessionID or $start_session: always need to be false
|
||||||
|
$phpcas_client_init_args[] = false;
|
||||||
|
|
||||||
|
// Call phpCAS::client() to initialize phpCAS client
|
||||||
|
call_user_func_array(array('phpCAS', 'client'), $phpcas_client_init_args);
|
||||||
|
|
||||||
// Configure CAS server SSL validation
|
// Configure CAS server SSL validation
|
||||||
$cas_server_ssl_validation_configured = false;
|
$cas_server_ssl_validation_configured = false;
|
||||||
|
|
Loading…
Reference in a new issue