diff --git a/modules/core/dictionaries/frontpage.definition.json b/modules/core/dictionaries/frontpage.definition.json index d939b47644b42fe363d6ed02e6d7e36aab47c6d9..5fa95513f3905cbdf84d3b25c3fd1f75281ec668 100644 --- a/modules/core/dictionaries/frontpage.definition.json +++ b/modules/core/dictionaries/frontpage.definition.json @@ -44,6 +44,9 @@ "warnings_https": { "en": "<strong>You are not using HTTPS<\/strong> - encrypted communication with the user. HTTP works fine for test purposes, but in a production environment, you should use HTTPS. [ <a href=\"http:\/\/rnd.feide.no\/content\/simplesamlphp-maintenance-and-configuration\">Read more about simpleSAMLphp maintenance<\/a> ]" }, + "warnings_suhosin_url_length": { + "en": "The length of query parameters is limited by the PHP Suhosin extension. Please increase the suhosin.get.max_value_length option to at least 2048 bytes." + }, "link_saml2example": { "en": "SAML 2.0 SP example - test logging in through your IdP" }, diff --git a/modules/core/dictionaries/frontpage.translation.json b/modules/core/dictionaries/frontpage.translation.json index 3edd6b6eeb9a336f77c3b9e541faccc9b0e7ac4f..aac712d787ee1cb5922a0afa4bea9bce8d02267f 100644 --- a/modules/core/dictionaries/frontpage.translation.json +++ b/modules/core/dictionaries/frontpage.translation.json @@ -1065,5 +1065,9 @@ "ja": "simpleSAMLphp\u8a2d\u5b9a\u30da\u30fc\u30b8", "nl": "simpleSAMLphp installatiepagina", "zh-tw": "simpleSAMLphp \u5b89\u88dd\u9801\u9762" + }, + "warnings_suhosin_url_length": { + "no": "Lengden p\u00e5 foresp\u00f8rselparametre er begrenset av PHP Suhosin utvidelsen. Vennligst \u00f8k suhosin.get.max_value_length konfigurasjonsinnstillingen til minst 2048 tegn.", + "nn": "Lengda p\u00e5 f\u00f8respurnadargumenta er begrensa av PHP Suhosin utvidinga. V\u00e6r vennleg og \u00f8k suhosin.get.max_value_length konfigurasjonsinnstillinga til minst 2048 teikn." } } diff --git a/modules/core/www/frontpage_config.php b/modules/core/www/frontpage_config.php index 7374b022e98330295e20610830eeb1eaba5e8a51..f40b6d4567c1cb26cf163d8f439377624af45bf8 100644 --- a/modules/core/www/frontpage_config.php +++ b/modules/core/www/frontpage_config.php @@ -20,6 +20,10 @@ 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}'; +}