X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fconfigtest.php;h=4362b32df65eec615918ae18ba4c4d9721918f24;hb=62fb877bb399fb7ae74231f16df5abd6c80094ce;hp=ea552cb1f206259634e163cc39925c4b6e9e7011;hpb=c13b8d16ea5860e2d8338dc7b409f8e476452c89;p=squirrelmail.git diff --git a/src/configtest.php b/src/configtest.php index ea552cb1..4362b32d 100644 --- a/src/configtest.php +++ b/src/configtest.php @@ -3,7 +3,7 @@ /** * SquirrelMail configtest script * - * @copyright © 2003-2006 The SquirrelMail Project Team + * @copyright © 2003-2007 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -216,6 +216,21 @@ if (function_exists('mb_internal_encoding') && do_err($mb_error); } +/** + * Do not use SquirrelMail with magic_quotes_* on. + */ +if ( get_magic_quotes_runtime() || get_magic_quotes_gpc() || + ( (bool) ini_get('magic_quotes_sybase') && ini_get('magic_quotes_sybase') != 'off' ) + ) { + $magic_quotes_warning='You have enabled any one of magic_quotes_runtime, ' + .'magic_quotes_gpc or magic_quotes_sybase in your PHP ' + .'configuration. We recommend all those settings to be off. SquirrelMail ' + .'may work with them on, but when experiencing stray backslashes in your mail ' + .'or other strange behaviour, it may be advisable to turn them off.'; + do_err($magic_quotes_warning,false); +} + + /* checking paths */ echo "Checking paths...
\n"; @@ -334,10 +349,10 @@ if (isset($plugins[0])) { do_err($plugin_load_error); } /** - * This hook was added in 1.5.2. Each plugins should print an error + * This hook was added in 1.5.2 and 1.4.10. Each plugins should print an error * message and return TRUE if there are any errors in its setup/configuration. */ - $plugin_err = boolean_hook_function('configtest', $null); + $plugin_err = boolean_hook_function('configtest', $null, 1); if($plugin_err) { do_err('Some plugin tests failed.'); } else {