Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2013-06-12 09:38:28 +02:00
commit f7edd8564a
6 changed files with 7 additions and 34 deletions

View File

@ -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
----------------------

View File

@ -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.

View File

@ -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

View File

@ -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');

View File

@ -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'),

View File

@ -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"])