Move db_details_{common,db_info,links}.php to libraries folder as it does not require direct access.

This commit is contained in:
Michal Čihař
2005-11-24 08:42:20 +00:00
parent 66aa9d2396
commit 5fe9f0f259
17 changed files with 28 additions and 35 deletions

View File

@@ -8,15 +8,8 @@ $Source$
2005-11-24 Michal Čihař <michal@cihar.com>
* libraries/header_http.inc.php, libraries/header_meta_style.inc.php: Fix
XSS on some libraries (CVE-2005-3665).
* db_details_structure.php, mult_submits.inc.php (deleted),
server_databases.php,
tbl_properties_structure.phptbl_properties_structure.php,
tbl_row_action.php, libraries/mult_submits.inc.php: Move
mult_submits.inc.php to libraries folder as it does not require direct
access.
* server_*, sql.php, libraries/server_common.inc.php,
libraries/server_links.inc.php: Move server_{links,common}.inc.php to
libraries folder as it does not require direct access.
* *.php, libraries/*.php: Move scritps that don't need direct access to
libraries folder.
2005-11-24 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* themes/original/*, css/phpmyadmin.css.php:

View File

@@ -7,7 +7,7 @@
* Gets some core libraries
*/
require_once('./libraries/common.lib.php');
require_once('./db_details_common.php');
require_once('./libraries/db_details_common.inc.php');
require_once('./libraries/relation.lib.php');

View File

@@ -7,14 +7,14 @@ require_once('./libraries/common.lib.php');
/**
* Runs common work
*/
require('./db_details_common.php');
require('./libraries/db_details_common.inc.php');
require_once './libraries/sql_query_form.lib.php';
/**
* Gets informations about the database and, if it is empty, move to the
* "db_details_structure.php" script where table can be created
*/
require('./db_details_db_info.php');
require('./libraries/db_details_db_info.inc.php');
if ( $num_tables == 0 && empty( $db_query_force ) ) {
$sub_part = '';
$is_info = TRUE;

View File

@@ -4,10 +4,10 @@
/**
* dumps a database
*
* @uses db_details_common.php
* @uses db_details_db_info.php
* @uses libraries/db_details_common.inc.php
* @uses libraries/db_details_db_info.inc.php
* @uses libraries/display_export.lib.php
* @uses $tables from db_details_db_info.php
* @uses $tables from libraries/db_details_db_info.inc.php
*/
/**
@@ -16,9 +16,9 @@
require_once('./libraries/common.lib.php');
$sub_part = '_export';
require_once('./db_details_common.php');
require_once('./libraries/db_details_common.inc.php');
$url_query .= '&amp;goto=db_details_export.php';
require_once('./db_details_db_info.php');
require_once('./libraries/db_details_db_info.inc.php');
/**
* Displays the form

View File

@@ -27,9 +27,9 @@ if (isset($submit_sql) && preg_match('@^SELECT@i', $encoded_sql_query)) {
exit();
} else {
$sub_part = '_qbe';
require('./db_details_common.php');
require('./libraries/db_details_common.inc.php');
$url_query .= '&amp;goto=db_details_qbe.php';
require('./db_details_db_info.php');
require('./libraries/db_details_db_info.inc.php');
}
if (isset($submit_sql) && !preg_match('@^SELECT@i', $encoded_sql_query)) {

View File

@@ -17,12 +17,12 @@ if ( empty( $is_info ) ) {
require('./libraries/mult_submits.inc.php');
$message = $strSuccess;
}
require('./db_details_common.php');
require('./libraries/db_details_common.inc.php');
$url_query .= '&amp;goto=db_details_structure.php';
// Gets the database structure
$sub_part = '_structure';
require('./db_details_db_info.php');
require('./libraries/db_details_db_info.inc.php');
}
// 1. No tables

View File

@@ -7,8 +7,8 @@ require_once('./libraries/common.lib.php');
/**
* Gets tables informations and displays top links
*/
require('./db_details_common.php');
require('./db_details_db_info.php');
require('./libraries/db_details_common.inc.php');
require('./libraries/db_details_db_info.inc.php');
$import_type = 'database';
require('./libraries/display_import.lib.php');

View File

@@ -119,12 +119,12 @@ if ($cfgRelation['commwork'] && isset($db_comment) && $db_comment == 'true') {
* because there is no table in the database ($is_info is TRUE)
*/
if (empty($is_info)) {
require('./db_details_common.php');
require('./libraries/db_details_common.inc.php');
$url_query .= '&amp;goto=db_operations.php';
// Gets the database structure
$sub_part = '_structure';
require('./db_details_db_info.php');
require('./libraries/db_details_db_info.inc.php');
echo "\n";
}

View File

@@ -10,7 +10,7 @@ require_once('./libraries/common.lib.php');
/**
* Gets some core libraries and send headers
*/
require('./db_details_common.php');
require('./libraries/db_details_common.inc.php');
// If config variable $cfg['Usedbsearch'] is on FALSE : exit.
if (!$cfg['UseDbSearch']) {
PMA_mysqlDie($strAccessDenied, '', FALSE, $err_url);
@@ -29,7 +29,7 @@ $num_tables = count($tables);
* Displays top links
*/
$sub_part = '';
require('./db_details_links.php');
require('./libraries/db_details_links.inc.php');
/**

View File

@@ -207,7 +207,7 @@ if (empty($GLOBALS['is_header_sent'])) {
$cfgRelation = PMA_getRelationsParam();
// Get additional information about tables for tooltip is done
// in db_details_db_info.php only once
// in libraries/db_details_db_info.inc.php only once
if ($cfgRelation['commwork']) {
$comment = PMA_getComments( $GLOBALS['db'] );

View File

@@ -134,5 +134,5 @@ $num_tables = count( $tables );
/**
* Displays top menu links
*/
require('./db_details_links.php');
require('./libraries/db_details_links.inc.php');
?>

View File

@@ -132,8 +132,8 @@ if ( !empty($submit_mult) && !empty($what)) {
require('./tbl_properties_table_info.php');
}
elseif (!empty($db)) {
require('./db_details_common.php');
require('./db_details_db_info.php');
require('./libraries/db_details_common.inc.php');
require('./libraries/db_details_db_info.inc.php');
}
// Builds the query
$full_query = '';

View File

@@ -6,7 +6,7 @@
* Gets some core libraries
*/
require_once('./libraries/common.lib.php');
require_once('./db_details_common.php');
require_once('./libraries/db_details_common.inc.php');
/**

View File

@@ -1200,7 +1200,7 @@ if (isset($viewing_mode) && $viewing_mode == 'db') {
// Gets the database structure
$sub_part = '_structure';
require('./db_details_db_info.php');
require('./libraries/db_details_db_info.inc.php');
echo "\n";
} else {
require('./libraries/server_links.inc.php');

View File

@@ -695,8 +695,8 @@ else {
require('./tbl_properties_links.php');
}
elseif (!empty($db)) {
require('./db_details_common.php');
require('./db_details_db_info.php');
require('./libraries/db_details_common.inc.php');
require('./libraries/db_details_db_info.inc.php');
}
else {
require('./libraries/server_common.inc.php');