From 99c1c0d68404803c93956796077435d43f047d10 Mon Sep 17 00:00:00 2001 From: kink Date: Sun, 7 Jan 2007 15:47:46 +0000 Subject: [PATCH] Add warning about magic_quotes_* in configtest. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12093 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 1 + src/configtest.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5266d2e7..34d45339 100644 --- a/ChangeLog +++ b/ChangeLog @@ -169,6 +169,7 @@ Version 1.5.2 - CVS and do_hook() now emulates do_hook_function()'s return value and also has its plugin arguments passed by value, etc. - Drop obsolete ORDB RBL from filters plugin (#1629398). + - Add warning about magic_quotes_* in configtest. Version 1.5.1 (branched on 2006-02-12) -------------------------------------- diff --git a/src/configtest.php b/src/configtest.php index ea552cb1..7d95c357 100644 --- a/src/configtest.php +++ b/src/configtest.php @@ -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"; -- 2.25.1