do not allow root user without password unless explicitly enabled by AllowEmptyRoot
This commit is contained in:
@@ -15,6 +15,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
|||||||
+ [auth] cookie auth now autogenerates blowfish_secret, but it has some
|
+ [auth] cookie auth now autogenerates blowfish_secret, but it has some
|
||||||
limitations and you still should set it in config file
|
limitations and you still should set it in config file
|
||||||
+ [auth] cookie authentication is now default
|
+ [auth] cookie authentication is now default
|
||||||
|
+ [auth] do not allow root user without password unless explicitly enabled by
|
||||||
|
AllowEmptyRoot
|
||||||
|
|
||||||
3.0.0.0 (not yet released)
|
3.0.0.0 (not yet released)
|
||||||
+ [export] properly handle line breaks for YAML, thanks to Dan Barry -
|
+ [export] properly handle line breaks for YAML, thanks to Dan Barry -
|
||||||
|
@@ -1032,6 +1032,11 @@ ALTER TABLE `pma_column_comments`
|
|||||||
boolean</dt>
|
boolean</dt>
|
||||||
<dd>Whether to allow root access. This is just simplification of rules below.
|
<dd>Whether to allow root access. This is just simplification of rules below.
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span id="cfg_Servers_AllowNoPasswordRoot">$cfg['Servers'][$i]['AllowNoPassowdRoot']</span>
|
||||||
|
boolean</dt>
|
||||||
|
<dd>Whether to allow acces to root user without password. This is to
|
||||||
|
protect against access to not configured MySQL server.
|
||||||
|
</dd>
|
||||||
<dt id="servers_allowdeny_order">
|
<dt id="servers_allowdeny_order">
|
||||||
<span id="cfg_Servers_AllowDeny_order">$cfg['Servers'][$i]['AllowDeny']['order']</span> string
|
<span id="cfg_Servers_AllowDeny_order">$cfg['Servers'][$i]['AllowDeny']['order']</span> string
|
||||||
</dt>
|
</dt>
|
||||||
|
@@ -870,6 +870,13 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
|||||||
unset($allowDeny_forbidden); //Clean up after you!
|
unset($allowDeny_forbidden); //Clean up after you!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// is root without password allowed?
|
||||||
|
if (!$cfg['Server']['AllowNoPasswordRoot'] && $cfg['Server']['user'] == 'root' && $cfg['Server']['password'] == '') {
|
||||||
|
$allowDeny_forbidden = true;
|
||||||
|
PMA_auth_fails();
|
||||||
|
unset($allowDeny_forbidden); //Clean up after you!
|
||||||
|
}
|
||||||
|
|
||||||
// Try to connect MySQL with the control user profile (will be used to
|
// Try to connect MySQL with the control user profile (will be used to
|
||||||
// get the privileges list for the current user but the true user link
|
// get the privileges list for the current user but the true user link
|
||||||
// must be open after this one so it would be default one for all the
|
// must be open after this one so it would be default one for all the
|
||||||
|
@@ -337,6 +337,13 @@ $cfg['Servers'][$i]['verbose_check'] = true;
|
|||||||
*/
|
*/
|
||||||
$cfg['Servers'][$i]['AllowRoot'] = true;
|
$cfg['Servers'][$i]['AllowRoot'] = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* whether to allow login of root user with no password (MySQL default)
|
||||||
|
*
|
||||||
|
* @global boolean $cfg['Servers'][$i]['AllowNoPasswordRoot']
|
||||||
|
*/
|
||||||
|
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Host authentication order, leave blank to not use
|
* Host authentication order, leave blank to not use
|
||||||
*
|
*
|
||||||
|
@@ -174,6 +174,7 @@ $str['Servers/1/only_db_desc'] = 'You can use MySQL wildcard characters (% and _
|
|||||||
$str['Servers/1/hide_db_name'] = 'Hide databases';
|
$str['Servers/1/hide_db_name'] = 'Hide databases';
|
||||||
$str['Servers/1/hide_db_desc'] = 'Hide databases matching regular expression (PCRE)';
|
$str['Servers/1/hide_db_desc'] = 'Hide databases matching regular expression (PCRE)';
|
||||||
$str['Servers/1/AllowRoot_name'] = 'Allow root login';
|
$str['Servers/1/AllowRoot_name'] = 'Allow root login';
|
||||||
|
$str['Servers/1/AllowNoPasswordRoot_name'] = 'Allow root without password';
|
||||||
$str['Servers/1/DisableIS_name'] = 'Disable use of INFORMATION_SCHEMA';
|
$str['Servers/1/DisableIS_name'] = 'Disable use of INFORMATION_SCHEMA';
|
||||||
$str['Servers/1/DisableIS_desc'] = 'More information on [a@http://sf.net/support/tracker.php?aid=1849494]PMA bug tracker[/a] and [a@http://bugs.mysql.com/19588]MySQL Bugs[/a]';
|
$str['Servers/1/DisableIS_desc'] = 'More information on [a@http://sf.net/support/tracker.php?aid=1849494]PMA bug tracker[/a] and [a@http://bugs.mysql.com/19588]MySQL Bugs[/a]';
|
||||||
$str['Servers/1/AllowDeny/order_name'] = 'Host authentication order';
|
$str['Servers/1/AllowDeny/order_name'] = 'Host authentication order';
|
||||||
|
@@ -44,6 +44,7 @@ $forms['Server_config'] = array('Servers' => array(1 => array(
|
|||||||
'only_db',
|
'only_db',
|
||||||
'hide_db',
|
'hide_db',
|
||||||
'AllowRoot',
|
'AllowRoot',
|
||||||
|
'AllowNoPasswordRoot',
|
||||||
'DisableIS',
|
'DisableIS',
|
||||||
'AllowDeny/order',
|
'AllowDeny/order',
|
||||||
'AllowDeny/rules',
|
'AllowDeny/rules',
|
||||||
|
Reference in New Issue
Block a user