diff --git a/doc/config.rst b/doc/config.rst index efe862cfab..877271d93c 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -986,17 +986,6 @@ Server connection settings Lifetime in seconds of the ``TABLE STATUS`` cache if :config:option:`$cfg['Servers'][$i]['StatusCacheDatabases']` is used. -.. config:option:: $cfg['Servers'][$i]['CaptchaLogin'] - - :type: string - :default: ``false`` - - Enables reCaptcha service for the specific server login screen. Works only - with cookie authentication type. It must have - :config:option:`$cfg['CaptchaLoginPublicKey']` and - :config:option:`$cfg['CaptchaLoginPrivateKey']` specified which are the - reCaptcha keys. - Generic settings ---------------- @@ -1310,8 +1299,7 @@ Cookie authentication options The public key for the reCaptcha service that can be obtain from http://www.google.com/recaptcha. - Needs to be enabled in server settings as well using - :config:option:`$cfg['Servers'][$i]['CaptchaLogin']`. + reCaptcha will be then used in :ref:`cookie`. .. config:option:: $cfg['CaptchaLoginPrivateKey'] @@ -1321,8 +1309,7 @@ Cookie authentication options The private key for the reCaptcha service that can be obtain from http://www.google.com/recaptcha. - Needs to be enabled in server settings as well using - :config:option:`$cfg['Servers'][$i]['CaptchaLogin']`. + reCaptcha will be then used in :ref:`cookie`. Navigation panel setup ---------------------- diff --git a/doc/setup.rst b/doc/setup.rst index 4a779c0bea..dc6a4266f8 100644 --- a/doc/setup.rst +++ b/doc/setup.rst @@ -419,4 +419,5 @@ are always ways to make your installation more secure: * consider hiding phpMyAdmin behind authentication proxy, so that MySQL credentials are not all users need to login * if you are afraid of automated attacks, enabling Captcha by - :config:option:`$cfg['Servers'][$i]['CaptchaLogin']` might be an option + :config:option:`$cfg['CaptchaLoginPublicKey']` and + :config:option:`$cfg['CaptchaLoginPrivateKey']` might be an option. diff --git a/libraries/config.default.php b/libraries/config.default.php index 03795d8581..0d2efe4cbe 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -265,13 +265,6 @@ $cfg['Servers'][$i]['LogoutURL'] = ''; */ $cfg['Servers'][$i]['nopassword'] = false; -/** - * Whether to enable reCaptcha service on the login screen. - * - * @global boolean $cfg['Servers'][$i]['recaptcha'] - */ -$cfg['Servers'][$i]['CaptchaLogin'] = false; - /** * If set to a db-name, only this db is displayed in navigation panel * It may also be an array of db-names diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php index 42d076fd9b..519aa01fff 100644 --- a/libraries/config/messages.inc.php +++ b/libraries/config/messages.inc.php @@ -405,8 +405,6 @@ $strConfigServers_MaxTableUiprefs_desc = __('Limits number of table preferences $strConfigServers_MaxTableUiprefs_name = __('Maximal number of table preferences to store'); $strConfigServers_nopassword_desc = __('Try to connect without password'); $strConfigServers_nopassword_name = __('Connect without password'); -$strConfigServers_CaptchaLogin_desc = __('Check if you want tp use reCaptcha on the login screen'); -$strConfigServers_CaptchaLogin_name = __('Enable reCaptcha'); $strConfigServers_only_db_desc = __('You can use MySQL wildcard characters (% and _), escape them if you want to use their literal instances, i.e. use [kbd]\'my\_db\'[/kbd] and not [kbd]\'my_db\'[/kbd].'); $strConfigServers_only_db_name = __('Show only listed databases'); $strConfigServers_password_desc = __('Leave empty if not using config auth'); diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php index 21c57abb16..134642f995 100644 --- a/libraries/config/setup.forms.php +++ b/libraries/config/setup.forms.php @@ -35,8 +35,7 @@ $forms['Servers']['Server'] = array('Servers' => array(1 => array( 'connect_type', 'extension', 'compress', - 'nopassword', - 'CaptchaLogin'))); + 'nopassword'))); $forms['Servers']['Server_auth'] = array('Servers' => array(1 => array( 'auth_type', ':group:' . __('Config authentication'), diff --git a/libraries/plugins/auth/AuthenticationCookie.class.php b/libraries/plugins/auth/AuthenticationCookie.class.php index b9931271ba..68c9b633c8 100644 --- a/libraries/plugins/auth/AuthenticationCookie.class.php +++ b/libraries/plugins/auth/AuthenticationCookie.class.php @@ -247,12 +247,9 @@ class AuthenticationCookie extends AuthenticationPlugin $skip = true; } - // Add captcha input field if $cfg['Servers'][$i]['CaptchaLogin'] - // is set to TRUE. + // Add captcha input field if reCaptcha is enabled if ( !empty($GLOBALS['cfg']['CaptchaLoginPrivateKey']) - && !empty($GLOBALS['cfg']['CaptchaLoginPublicKey']) - && isset($GLOBALS['cfg']['Server']['CaptchaLogin']) - && $GLOBALS['cfg']['Server']['CaptchaLogin'] + && !empty($GLOBALS['cfg']['CaptchaLoginPublicKey'])) && !$skip ) { // If enabled show captcha to the user on the login screen. @@ -369,8 +366,6 @@ class AuthenticationCookie extends AuthenticationPlugin // Verify Captcha if it is required. if ( !empty($GLOBALS['cfg']['CaptchaLoginPrivateKey']) && !empty($GLOBALS['cfg']['CaptchaLoginPublicKey']) - && isset($GLOBALS['cfg']['Server']['CaptchaLogin']) - && $GLOBALS['cfg']['Server']['CaptchaLogin'] && !$skip ) { if ( !empty($_POST["recaptcha_challenge_field"])