From a09b9c2bb251813612736170cec5dacde00b0233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 3 Mar 2009 11:07:04 +0000 Subject: [PATCH] rfe #2123386 Added option to disable mcrypt warning. --- ChangeLog | 1 + Documentation.html | 6 ++++++ libraries/auth/cookie.auth.lib.php | 4 +++- libraries/config.default.php | 8 ++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ad2afe995..7e7d277d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA applies to all accounts (even the anonymous user) - patch #2652972 [relation] Missing code with hashing for relationship editing, thanks to knittl - knittl ++ rfe #2123386 Added option to disable mcrypt warning. 3.1.4.0 (not yet released) + patch #1808339 [doc] Apache SSLOptions and StdEnvVars FAQ, diff --git a/Documentation.html b/Documentation.html index 305995e43..b697c869a 100644 --- a/Documentation.html +++ b/Documentation.html @@ -607,6 +607,12 @@ since this link provides funding for phpMyAdmin. You can set this parameter to TRUE to stop this message from appearing. +
$cfg['McryptDisableWarning'] boolean
+
Disable the default warning that is displayed if mcrypt is missing for + cookie authentication. + You can set this parameter to TRUE to stop this message + from appearing.
+
$cfg['AllowThirdPartyFraming'] boolean
Setting this to true allows a page located on a different domain to call phpMyAdmin inside a frame, and is a potential security diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index af0ecb7b0..d3e7ad08f 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -76,7 +76,9 @@ if (function_exists('mcrypt_encrypt')) { } else { require_once './libraries/blowfish.php'; - trigger_error(PMA_sanitize(sprintf($strCantLoad, 'mcrypt')), E_USER_WARNING); + if (!$GLOBALS['cfg']['McryptDisableWarning']) { + trigger_error(PMA_sanitize(sprintf($strCantLoad, 'mcrypt')), E_USER_WARNING); + } } /** diff --git a/libraries/config.default.php b/libraries/config.default.php index 54b076445..276284ca9 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -54,6 +54,14 @@ $cfg['PmaNoRelation_DisableWarning'] = false; */ $cfg['SuhosinDisableWarning'] = false; +/** + * Disable the default warning that is displayed if mcrypt is missing for + * cookie authentication. + * + * @global boolean $cfg['McryptDisableWarning'] + */ +$cfg['McryptDisableWarning'] = false; + /** * Allows phpMyAdmin to be included from a document located on * another domain; setting this to true is a potential security hole