From ca57351bf9468008f190e61c9b73fb1b97483190 Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Tue, 15 Mar 2011 13:35:23 +0000 Subject: [PATCH] frontpage: Only detect URL length limit when Suhosin extension is loaded. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2777 44740490-163a-0410-bde0-09ae8108e29a --- modules/core/www/frontpage_config.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/core/www/frontpage_config.php b/modules/core/www/frontpage_config.php index f40b6d456..84f0d22f1 100644 --- a/modules/core/www/frontpage_config.php +++ b/modules/core/www/frontpage_config.php @@ -20,9 +20,11 @@ if (!SimpleSAML_Utilities::isHTTPS()) { $warnings[] = '{core:frontpage:warnings_https}'; } -$suhosinLength = ini_get('suhosin.get.max_value_length'); -if ($suhosinLength !== FALSE && (int)$suhosinLength < 2048) { - $warnings[] = '{core:frontpage:warnings_suhosin_url_length}'; +if (extension_loaded('suhosin')) { + $suhosinLength = ini_get('suhosin.get.max_value_length'); + if (empty($suhosinLength) || (int)$suhosinLength < 2048) { + $warnings[] = '{core:frontpage:warnings_suhosin_url_length}'; + } } -- GitLab