unset($dummy); // here, the function does not exist with this configuration: // $cfg['ServerDefault'] = 0; $GLOBALS['is_superuser'] = isset($GLOBALS['dbi']) && $GLOBALS['dbi']->isSuperuser(); if (!empty($__redirect) && in_array($__redirect, $goto_whitelist)) { /** * include subform target page */ include $__redirect; exit; } // If Zero configuration mode enabled, check PMA tables in current db. if (!defined('PMA_MINIMUM_COMMON') && !empty($GLOBALS['server']) && isset($GLOBALS['cfg']['ZeroConf']) && $GLOBALS['cfg']['ZeroConf'] == true) { if (!empty($GLOBALS['db'])) { $cfgRelation = PMA_getRelationsParam(); if (empty($cfgRelation['db'])) { PMA_fixPMATables($GLOBALS['db'], false); } } $cfgRelation = PMA_getRelationsParam(); if (empty($cfgRelation['db'])) { foreach ($GLOBALS['pma']->databases as $database) { if ($database == 'phpmyadmin') { PMA_fixPMATables($database, false); } } } } if (!defined('PMA_MINIMUM_COMMON')) { include_once 'libraries/config/page_settings.class.php'; }
<?php require_once 'libraries/common.inc.php'; // If request for creating all PMA tables. if (isset($_REQUEST['create_pmadb'])) { PMA_fixPMATables($GLOBALS['db']); } $cfgRelation = PMA_getRelationsParam(); // If request for creating missing PMA tables. if (isset($_REQUEST['fix_pmadb'])) { PMA_fixPMATables($cfgRelation['db']); } $response = PMA_Response::getInstance(); $response->addHTML(PMA_getRelationsParamDiagnostic($cfgRelation));
PMA_fatalError(__('possible exploit')); } /** * Check for numeric keys * (if register_globals is on, numeric key can be found in $GLOBALS) */ foreach ($GLOBALS as $key => $dummy) { if (is_numeric($key)) { PMA_fatalError(__('numeric key detected')); } } unset($dummy); // here, the function does not exist with this configuration: // $cfg['ServerDefault'] = 0; $GLOBALS['is_superuser'] = isset($GLOBALS['dbi']) && $GLOBALS['dbi']->isSuperuser(); if (!empty($__redirect) && in_array($__redirect, $goto_whitelist)) { /** * include subform target page */ include $__redirect; exit; } // If Zero configuration mode enabled, check PMA tables in current db. if (!defined('PMA_MINIMUM_COMMON') && isset($GLOBALS['cfg']['ZeroConf']) && $GLOBALS['cfg']['ZeroConf'] == true) { if (!empty($GLOBALS['db'])) { $cfgRelation = PMA_getRelationsParam(); if (empty($cfgRelation['db'])) { PMA_fixPMATables($GLOBALS['db'], false); } } }
/** * Checks and fixes configuration storage in current DB. * * @return void */ function PMA_checkAndFixPMATablesInCurrentDb() { if (isset($GLOBALS['db']) && !empty($GLOBALS['db'])) { if (isset($GLOBALS['cfg']['Server']['pmadb']) && empty($GLOBALS['cfg']['Server']['pmadb'])) { $default_tables = PMA_getDefaultPMATableNames(); if (PMA_searchPMATablesInDb($GLOBALS['db'], array_keys($default_tables))) { PMA_fixPMATables($GLOBALS['db']); // Since configuration storage is updated, we need to // re-initialize the favorite and recent tables stored in the // session from the current configuration storage. include_once 'libraries/RecentFavoriteTable.class.php'; $fav_tables = PMA_RecentFavoriteTable::getInstance('favorite'); $recent_tables = PMA_RecentFavoriteTable::getInstance('recent'); $_SESSION['tmpval']['favorite_tables'][$GLOBALS['server']] = $fav_tables->getFromDb(); $_SESSION['tmpval']['recent_tables'][$GLOBALS['server']] = $recent_tables->getFromDb(); // Reload navi panel to update the recent/favorite lists. $GLOBALS['reload'] = true; } } } }
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Displays status of phpMyAdmin configuration storage * * @package PhpMyAdmin */ require_once 'libraries/common.inc.php'; // If request for fixing PMA tables. if (isset($_REQUEST['fix_pmadb'])) { PMA_fixPMATables($GLOBALS['db']); } $response = PMA_Response::getInstance(); $response->addHTML(PMA_getRelationsParamDiagnostic(PMA_getRelationsParam()));