10if (
$config->getBoolean(
'admin.protectindexpage', 
false)) {
 
   20        $warnings[] = 
'{core:frontpage:warnings_https}';
 
   23if (
$config->getValue(
'secretsalt') === 
'defaultsecretsalt') {
 
   24        $warnings[] = 
'{core:frontpage:warnings_secretsalt}';
 
   27if (extension_loaded(
'suhosin')) {
 
   28        $suhosinLength = ini_get(
'suhosin.get.max_value_length');
 
   29        if (empty($suhosinLength) || (
int)$suhosinLength < 2048) {
 
   30                $warnings[] = 
'{core:frontpage:warnings_suhosin_url_length}';
 
   48        'text' => 
'{core:frontpage:link_diagnostics}' 
   53        'text' => 
'{core:frontpage:link_phpinfo}' 
   68if (
$config->getBoolean(
'admin.checkforupdates', 
true) && 
$current !== 
'master') {
 
   69        $latest = 
$session->getData(
"core:latest_simplesamlphp_version", 
"version");
 
   72                $api_url = 
'https://api.github.com/repos/simplesamlphp/simplesamlphp/releases';
 
   73                $ch = curl_init($api_url.
'/latest');
 
   74                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 
   75                curl_setopt($ch, CURLOPT_USERAGENT, 
'SimpleSAMLphp');
 
   76                curl_setopt($ch, CURLOPT_TIMEOUT, 2);
 
   79                if (curl_getinfo($ch, CURLINFO_HTTP_CODE) === 200) {
 
   81                        $session->setData(
"core:latest_simplesamlphp_version", 
"version", $latest);
 
   86        if ($latest && version_compare(
$current, ltrim($latest[
'tag_name'], 
'v'), 
'lt')) {
 
   89                        '{core:frontpage:warnings_outdated}',
 
   90                        array(
'%LATEST_URL%' => $latest[
'html_url'])
 
   96        'saml20-idp' => 
$config->getBoolean(
'enable.saml20-idp', 
false),
 
   97        'shib13-idp' => 
$config->getBoolean(
'enable.shib13-idp', 
false),
 
  102        'time'             => array(
'required', 
'Date/Time Extension'),
 
  103        'hash'             => array(
'required',  
'Hashing function'),
 
  104        'gzinflate'        => array(
'required',  
'ZLib'),
 
  105        'openssl_sign'     => array(
'required',  
'OpenSSL'),
 
  106        'dom_import_simplexml' => array(
'required', 
'XML DOM'),
 
  107        'preg_match'       => array(
'required',  
'RegEx support'),
 
  108        'json_decode'      => array(
'required', 
'JSON support'),
 
  109        'class_implements' => array(
'required', 
'Standard PHP Library (SPL)'),
 
  110        'mb_strlen'        => array(
'required', 
'Multibyte String Extension'),
 
  111        'curl_init'        => array(
'optional', 
'cURL (required if automatic version checks are used, also by some modules.'),
 
  112        'session_start'  => array(
'optional', 
'Session Extension (required if PHP sessions are used)'),
 
  113        'pdo_drivers'    => array(
'optional',  
'PDO Extension (required if a database backend is used)'),
 
  115if (
SimpleSAML\Module::isModuleEnabled(
'ldap')) {
 
  116        $functionchecks[
'ldap_bind'] = array(
'optional',  
'LDAP Extension (required if an LDAP backend is used)');
 
  118if (
SimpleSAML\Module::isModuleEnabled(
'radius')) {
 
  119        $functionchecks[
'radius_auth_open'] = array(
'optional',  
'Radius Extension (required if a Radius backend is used)');
 
  124        'required' => 
'required', 
 
  125        'descr' => 
'PHP Version >= 5.4. You run: ' . phpversion(),
 
  126        'enabled' => version_compare(phpversion(), 
'5.4', 
'>='));
 
  128        $funcmatrix[] = array(
'descr' => $descr[1], 
'required' => $descr[0], 
'enabled' => function_exists($func));
 
  132    'required' => 
'optional',
 
  133    'descr' => 
'predis/predis (required if the redis data store is used)',
 
  134    'enabled' => class_exists(
'\Predis\Client'),
 
  138    'required' => 
'optional',
 
  139    'descr' => 
'Memcache or Memcached Extension (required if a Memcached backend is used)',
 
  140    'enabled' => class_exists(
'Memcache') || class_exists(
'Memcached'),
 
  145if(
$config->getString(
'technicalcontact_email', 
'na@example.org') === 
'na@example.org') {
 
  151        'required' => 
'recommended',
 
  152        'descr' => 
'technicalcontact_email option set',
 
  153        'enabled' => $mail_ok
 
  155if(
$config->getString(
'auth.adminpassword', 
'123') === 
'123') {
 
  156        $password_ok = FALSE;
 
  161        'required' => 
'required',
 
  162        'descr' => 
'auth.adminpassword option set',
 
  163        'enabled' => $password_ok
 
  167        'required' => 
'recommended',
 
  168        'descr' => 
'Magic Quotes should be turned off',
 
  169        'enabled' => (get_magic_quotes_runtime() == 0)
 
  174$t->data[
'pageid'] = 
'frontpage_config';
 
  190$t->data[
'requiredmap'] = array(
 
  191    'recommended' => 
$t->noop(
'{core:frontpage:recommended}'),
 
  192    'required' => 
$t->noop(
'{core:frontpage:required}'),
 
  193    'optional' => 
$t->noop(
'{core:frontpage:optional}'),
 
  196$t->data[
'directory'] = dirname(dirname(dirname(dirname(__FILE__))));
 
An exception for terminatinating execution or to throw for unit testing.
static callHooks($hook, &$data=null)
Call a hook in all enabled modules.
static isAdmin()
Check whether the current user is admin.
static getAdminLoginURL($returnTo=null)
Retrieve a admin login URL.
static requireAdmin()
Require admin access to the current page.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
static getSessionFromRequest()
Retrieves the current session.
if($config->getBoolean('admin.protectindexpage', false)) $loginurl
if(SimpleSAML\Module::isModuleEnabled( 'ldap')) if(SimpleSAML\Module::isModuleEnabled('radius')) $funcmatrix
if(!\SimpleSAML\Utils\HTTP::isHTTPS()) if( $config->getValue( 'secretsalt')==='defaultsecretsalt') if(extension_loaded('suhosin')) $links
if($config->getBoolean('admin.checkforupdates', true) && $current !=='master') $enablematrix
Attribute-related utility methods.
getBaseURL($t, $type='get', $key=null, $value=null)