do not allow root user without password unless explicitly enabled by AllowEmptyRoot

This commit is contained in:
Michal Čihař
2008-09-03 13:45:12 +00:00
parent c2489bc131
commit e0987bfbc8
6 changed files with 25 additions and 2 deletions

View File

@@ -870,6 +870,13 @@ if (! defined('PMA_MINIMUM_COMMON')) {
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
// 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