Git
Threads by month
- ----- 2025 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 13 participants
- 38624 discussions

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_4RC1-16980-gc120738
by Piotr Przybylski 24 Aug '11
by Piotr Przybylski 24 Aug '11
24 Aug '11
The branch, master has been updated
via c12073871d28eae68769c134781e5eead1722c5f (commit)
from 84f621b545e23ccc8645701c7a8d18380226332d (commit)
- Log -----------------------------------------------------------------
commit c12073871d28eae68769c134781e5eead1722c5f
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Wed Aug 24 21:00:41 2011 +0200
Remove deprecated method PMA_Table::_isView()
-----------------------------------------------------------------------
Summary of changes:
libraries/Table.class.php | 33 +++++----------------------------
1 files changed, 5 insertions(+), 28 deletions(-)
diff --git a/libraries/Table.class.php b/libraries/Table.class.php
index 46ebb91..8f04945 100644
--- a/libraries/Table.class.php
+++ b/libraries/Table.class.php
@@ -180,7 +180,8 @@ class PMA_Table
static public function isView($db = null, $table = null)
{
if (strlen($db) && strlen($table)) {
- return PMA_Table::_isView($db, $table);
+ $type = PMA_Table::sGetStatusInfo($db, $table, 'TABLE_TYPE');
+ return $type == 'VIEW';
}
return false;
@@ -252,30 +253,6 @@ class PMA_Table
}
/**
- * Checks if this "table" is a view
- *
- * @param string $db the database name
- * @param string $table the table name
- *
- * @deprecated
- * @todo see what we could do with the possible existence of $table_is_view
- *
- * @return boolean whether this is a view
- */
- static protected function _isView($db, $table)
- {
- // maybe we already know if the table is a view
- if (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view']) {
- return true;
- }
-
- // Since phpMyAdmin 3.2 the field TABLE_TYPE is properly filled by
- // PMA_DBI_get_tables_full()
- $type = PMA_Table::sGetStatusInfo($db, $table, 'TABLE_TYPE');
- return $type == 'VIEW';
- }
-
- /**
* Checks if this is a merge table
*
* If the ENGINE of the table is MERGE or MRG_MYISAM (alias),
@@ -795,7 +772,7 @@ class PMA_Table
if (isset($GLOBALS['drop_if_exists'])
&& $GLOBALS['drop_if_exists'] == 'true'
) {
- if (PMA_Table::_isView($target_db, $target_table)) {
+ if (PMA_Table::isView($target_db, $target_table)) {
$drop_query = 'DROP VIEW';
} else {
$drop_query = 'DROP TABLE';
@@ -866,7 +843,7 @@ class PMA_Table
// Copy the data unless this is a VIEW
if (($what == 'data' || $what == 'dataonly')
- && ! PMA_Table::_isView($target_db, $target_table)
+ && ! PMA_Table::isView($target_db, $target_table)
) {
$sql_insert_data = 'INSERT INTO ' . $target . ' SELECT * FROM ' . $source;
PMA_DBI_query($sql_insert_data);
@@ -882,7 +859,7 @@ class PMA_Table
// moving table from replicated one to not replicated one
PMA_DBI_select_db($source_db);
- if (PMA_Table::_isView($source_db, $source_table)) {
+ if (PMA_Table::isView($source_db, $source_table)) {
$sql_drop_query = 'DROP VIEW';
} else {
$sql_drop_query = 'DROP TABLE';
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_4RC1-16979-g84f621b
by Madhura Jayaratne 24 Aug '11
by Madhura Jayaratne 24 Aug '11
24 Aug '11
The branch, master has been updated
via 84f621b545e23ccc8645701c7a8d18380226332d (commit)
via 14c332461cea55aae9642bb1ae7757800a9d6d96 (commit)
via 786328c50b1387c31f02e698693d67ad7b11330a (commit)
via 4e89311089f9d63db39ba619bab8d0a6f5623204 (commit)
from 2e1d5ac20a6245d50fcf09f4ba90eb6b7197a360 (commit)
- Log -----------------------------------------------------------------
commit 84f621b545e23ccc8645701c7a8d18380226332d
Author: Madhura Jayaratne <madhura.cj(a)gmail.com>
Date: Wed Aug 24 22:52:28 2011 +0530
Sanitize filenames in a unified manner - more instances
commit 14c332461cea55aae9642bb1ae7757800a9d6d96
Merge: 2e1d5ac 786328c
Author: Madhura Jayaratne <madhura.cj(a)gmail.com>
Date: Wed Aug 24 22:50:37 2011 +0530
Merge branch 'QA_3_4'
Conflicts:
export.php
-----------------------------------------------------------------------
Summary of changes:
export.php | 4 +---
libraries/gis/pma_gis_visualization.php | 3 +--
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/export.php b/export.php
index 5f91713..c5af244 100644
--- a/export.php
+++ b/export.php
@@ -274,9 +274,7 @@ if ($asfile) {
}
}
$filename = PMA_expandUserString($filename_template);
-
- // convert filename to iso-8859-1, it is safer
- $filename = PMA_convert_string('utf-8', 'iso-8859-1', $filename);
+ $filename = PMA_sanitize_filename($filename);
// Grab basic dump extension and mime type
// Check if the user already added extension; get the substring where the extension would be if it was included
diff --git a/libraries/gis/pma_gis_visualization.php b/libraries/gis/pma_gis_visualization.php
index 29f2e1c..1c9ea58 100644
--- a/libraries/gis/pma_gis_visualization.php
+++ b/libraries/gis/pma_gis_visualization.php
@@ -104,8 +104,7 @@ class PMA_GIS_Visualization
*/
private function _sanitizeName($file_name, $ext)
{
- // convert filename to iso-8859-1, it is safer
- $file_name = PMA_convert_string('utf-8', 'iso-8859-1', $file_name);
+ $file_name = PMA_sanitize_filename($file_name);
// Check if the user already added extension;
// get the substring where the extension would be if it was included
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, QA_3_4, updated. RELEASE_3_4_4RC1-40-g786328c
by Madhura Jayaratne 24 Aug '11
by Madhura Jayaratne 24 Aug '11
24 Aug '11
The branch, QA_3_4 has been updated
via 786328c50b1387c31f02e698693d67ad7b11330a (commit)
from 4e89311089f9d63db39ba619bab8d0a6f5623204 (commit)
- Log -----------------------------------------------------------------
commit 786328c50b1387c31f02e698693d67ad7b11330a
Author: Madhura Jayaratne <madhura.cj(a)gmail.com>
Date: Wed Aug 24 22:44:38 2011 +0530
Sanitize filenames (in a unified manner) before using in Content-Disposition header
-----------------------------------------------------------------------
Summary of changes:
export.php | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/export.php b/export.php
index 100269f..fb8805a 100644
--- a/export.php
+++ b/export.php
@@ -271,9 +271,7 @@ if ($asfile) {
}
}
$filename = PMA_expandUserString($filename_template);
-
- // convert filename to iso-8859-1, it is safer
- $filename = PMA_convert_string($charset, 'iso-8859-1', $filename);
+ $filename = PMA_sanitize_filename($filename);
// Grab basic dump extension and mime type
// Check if the user already added extension; get the substring where the extension would be if it was included
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, TESTING, updated. RELEASE_3_4_4-43-g4788017
by Marc Delisle 24 Aug '11
by Marc Delisle 24 Aug '11
24 Aug '11
The branch, TESTING has been updated
via 478801729d9a939dd06b75a62b029a8cc618a3d4 (commit)
via b5686c68ab98b2916f187daff90f8b8f392ce394 (commit)
via dd81a0fce80b7766e7305c16c7b2cf32207d80fd (commit)
via f00c57bdf3669d7471b30e6750f6762d2e01947b (commit)
via 4e5c583dcfdd6307f1093f80a9e1d1ff0480cc7d (commit)
via c547703b1089bff62b238a908d8559ca3ad845f1 (commit)
via b659fbeb128b3235738d6fd787cab096ddc3a591 (commit)
via 0f5f2d960184db7333ecf7d52da406cae306412b (commit)
via 39edf6e1fbe4a39f6fec0919d60eca5dfc2708ff (commit)
via 3d8fddceb0f084d4b77c58c48a98e002db6baa6a (commit)
via 2b0d12b2deb1b6b5c4073ecaa7971cb0bbb83389 (commit)
via ec848d825ffe896b96b6c3e4b8c7d4c12aadd310 (commit)
from 049fd9fd97ed3da8cb38804be1666125129d4b19 (commit)
- Log -----------------------------------------------------------------
commit 478801729d9a939dd06b75a62b029a8cc618a3d4
Merge: 049fd9f b5686c6
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Aug 24 12:46:30 2011 -0400
Merge branch 'MAINT_3_4_4' into TESTING
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 3 +-
Documentation.html | 4 +-
README | 2 +-
export.php | 1 +
libraries/Config.class.php | 2 +-
libraries/sanitizing.lib.php | 18 +++++
libraries/schema/Dia_Relation_Schema.class.php | 1 +
libraries/schema/Eps_Relation_Schema.class.php | 1 +
libraries/schema/Pdf_Relation_Schema.class.php | 2 +
libraries/schema/Svg_Relation_Schema.class.php | 1 +
libraries/schema/Visio_Relation_Schema.class.php | 1 +
tbl_get_field.php | 3 +-
tbl_tracking.php | 75 ++++++++++++----------
transformation_wrapper.php | 2 +-
14 files changed, 74 insertions(+), 42 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3c30745..3fa39b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
phpMyAdmin - ChangeLog
======================
-3.4.4.0 (not yet released)
+3.4.4.0 (2011-08-24)
- bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes
- bug #3323101 [parser] Invalid escape sequence in SQL parser
- bug #3348995 [config] $cfg['Export']['asfile'] set to false does not select asText option
@@ -19,6 +19,7 @@ phpMyAdmin - ChangeLog
- bug #3372807 [interface] Fix security warning link in setup
- bug #3374347 [display] Backquotes in normal text on import page
- bug #3358750 [core] With Suhosin, urls are too long in edit links
+- [security] Missing sanitization on the table, column and index names leads to XSS vulnerabilities, see PMASA-2011-13
3.4.3.2 (2011-07-23)
- [security] Fixed XSS vulnerability, see PMASA-2011-9
diff --git a/Documentation.html b/Documentation.html
index 057c6c9..fd0f6b8 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -9,7 +9,7 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>phpMyAdmin 3.4.4-rc1 - Documentation</title>
+ <title>phpMyAdmin 3.4.4 - Documentation</title>
<link rel="stylesheet" type="text/css" href="docs.css" />
</head>
@@ -17,7 +17,7 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78
<div id="header">
<h1>
<a href="http://www.phpmyadmin.net/">php<span class="myadmin">MyAdmin</span></a>
- 3.4.4-rc1
+ 3.4.4
Documentation
</h1>
</div>
diff --git a/README b/README
index 6e7197d..ab29c94 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
phpMyAdmin - Readme
===================
-Version 3.4.4-rc1
+Version 3.4.4
A set of PHP-scripts to manage MySQL over the web.
diff --git a/export.php b/export.php
index 7da25fc..100269f 100644
--- a/export.php
+++ b/export.php
@@ -343,6 +343,7 @@ if (!$save_on_server) {
// (avoid rewriting data containing HTML with anchors and forms;
// this was reported to happen under Plesk)
@ini_set('url_rewriter.tags','');
+ $filename = PMA_sanitize_filename($filename);
header('Content-Type: ' . $mime_type);
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
diff --git a/libraries/Config.class.php b/libraries/Config.class.php
index a55bd02..37356e0 100644
--- a/libraries/Config.class.php
+++ b/libraries/Config.class.php
@@ -96,7 +96,7 @@ class PMA_Config
*/
function checkSystem()
{
- $this->set('PMA_VERSION', '3.4.4-rc1');
+ $this->set('PMA_VERSION', '3.4.4');
/**
* @deprecated
*/
diff --git a/libraries/sanitizing.lib.php b/libraries/sanitizing.lib.php
index a362ebd..a65f8ba 100644
--- a/libraries/sanitizing.lib.php
+++ b/libraries/sanitizing.lib.php
@@ -86,4 +86,22 @@ function PMA_sanitize($message, $escape = false, $safe = false)
return $message;
}
+
+
+/**
+ * Sanitize a filename by removing anything besides A-Za-z0-9_.-
+ *
+ * Intended usecase:
+ * When using a filename in a Content-Disposition header the value should not contain ; or "
+ *
+ * @param string The filename
+ *
+ * @return string the sanitized filename
+ *
+ */
+function PMA_sanitize_filename($filename) {
+ $filename = preg_replace('/[^A-Za-z0-9_.-]/', '_', $filename);
+ return $filename;
+}
+
?>
diff --git a/libraries/schema/Dia_Relation_Schema.class.php b/libraries/schema/Dia_Relation_Schema.class.php
index e58381e..2f6373e 100644
--- a/libraries/schema/Dia_Relation_Schema.class.php
+++ b/libraries/schema/Dia_Relation_Schema.class.php
@@ -173,6 +173,7 @@ class PMA_DIA extends XMLWriter
if(ob_get_clean()){
ob_end_clean();
}
+ $fileName = PMA_sanitize_filename($fileName);
header('Content-type: application/x-dia-diagram');
header('Content-Disposition: attachment; filename="'.$fileName.'.dia"');
$output = $this->flush();
diff --git a/libraries/schema/Eps_Relation_Schema.class.php b/libraries/schema/Eps_Relation_Schema.class.php
index 5435db4..7f1c34d 100644
--- a/libraries/schema/Eps_Relation_Schema.class.php
+++ b/libraries/schema/Eps_Relation_Schema.class.php
@@ -336,6 +336,7 @@ class PMA_EPS
// if(ob_get_clean()){
//ob_end_clean();
//}
+ $fileName = PMA_sanitize_filename($fileName);
header('Content-type: image/x-eps');
header('Content-Disposition: attachment; filename="'.$fileName.'.eps"');
$output = $this->stringCommands;
diff --git a/libraries/schema/Pdf_Relation_Schema.class.php b/libraries/schema/Pdf_Relation_Schema.class.php
index 6078537..ad0fe7a 100644
--- a/libraries/schema/Pdf_Relation_Schema.class.php
+++ b/libraries/schema/Pdf_Relation_Schema.class.php
@@ -1075,6 +1075,8 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
if (empty($filename)) {
$filename = $pageNumber . '.pdf';
}
+ $fileName = PMA_sanitize_filename($fileName);
+
// instead of $pdf->Output():
$pdfData = $pdf->getPDFData();
header('Content-Type: application/pdf');
diff --git a/libraries/schema/Svg_Relation_Schema.class.php b/libraries/schema/Svg_Relation_Schema.class.php
index afafda7..52eb439 100644
--- a/libraries/schema/Svg_Relation_Schema.class.php
+++ b/libraries/schema/Svg_Relation_Schema.class.php
@@ -171,6 +171,7 @@ class PMA_SVG extends XMLWriter
function showOutput($fileName)
{
//ob_get_clean();
+ $fileName = PMA_sanitize_filename($fileName);
header('Content-type: image/svg+xml');
header('Content-Disposition: attachment; filename="'.$fileName.'.svg"');
$output = $this->flush();
diff --git a/libraries/schema/Visio_Relation_Schema.class.php b/libraries/schema/Visio_Relation_Schema.class.php
index ab45b13..0c3f7ec 100644
--- a/libraries/schema/Visio_Relation_Schema.class.php
+++ b/libraries/schema/Visio_Relation_Schema.class.php
@@ -158,6 +158,7 @@ class PMA_VISIO extends XMLWriter
//if(ob_get_clean()){
//ob_end_clean();
//}
+ $fileName = PMA_sanitize_filename($fileName);
header('Content-type: application/visio');
header('Content-Disposition: attachment; filename="'.$fileName.'.vdx"');
$output = $this->flush();
diff --git a/tbl_get_field.php b/tbl_get_field.php
index a58eb51..be0bdde 100644
--- a/tbl_get_field.php
+++ b/tbl_get_field.php
@@ -39,7 +39,8 @@ if ($result === false) {
header('Content-Type: ' . PMA_detectMIME($result));
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
-header('Content-Disposition: attachment; filename="' . $table . '-' . $transform_key . '.bin"');
+$filename = PMA_sanitize_filename($table . '-' . $transform_key . '.bin');
+header('Content-Disposition: attachment; filename="' . $filename . '"');
if (PMA_USR_BROWSER_AGENT == 'IE') {
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
diff --git a/tbl_tracking.php b/tbl_tracking.php
index 99a540e..96d5024 100644
--- a/tbl_tracking.php
+++ b/tbl_tracking.php
@@ -111,7 +111,8 @@ if (isset($_REQUEST['report_export']) && $_REQUEST['export_type'] == 'sqldumpfil
foreach($entries as $entry) {
$dump .= $entry['statement'];
}
- $filename = 'log_' . htmlspecialchars($_REQUEST['table']) . '.sql';
+ //$filename = 'log_' . str_replace(';', '', htmlspecialchars($_REQUEST['table'])) . '.sql';
+ $filename = PMA_sanitize_filename('log_' . $_REQUEST['table'] . '.sql');
header('Content-Type: text/x-sql');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-Disposition: attachment; filename="' . $filename . '"');
@@ -281,17 +282,17 @@ if (isset($_REQUEST['snapshot'])) {
<tr class="noclick <?php echo $style; ?>">
<?php
if ($field['Key'] == 'PRI') {
- echo '<td><b><u>' . $field['Field'] . '</u></b></td>' . "\n";
+ echo '<td><b><u>' . htmlspecialchars($field['Field']) . '</u></b></td>' . "\n";
} else {
- echo '<td><b>' . $field['Field'] . '</b></td>' . "\n";
+ echo '<td><b>' . htmlspecialchars($field['Field']) . '</b></td>' . "\n";
}
?>
- <td><?php echo $field['Type'];?></td>
- <td><?php echo $field['Collation'];?></td>
- <td><?php echo $field['Null'];?></td>
- <td><?php echo $field['Default'];?></td>
- <td><?php echo $field['Extra'];?></td>
- <td><?php echo $field['Comment'];?></td>
+ <td><?php echo htmlspecialchars($field['Type']);?></td>
+ <td><?php echo htmlspecialchars($field['Collation']);?></td>
+ <td><?php echo htmlspecialchars($field['Null']);?></td>
+ <td><?php echo htmlspecialchars($field['Default']);?></td>
+ <td><?php echo htmlspecialchars($field['Extra']);?></td>
+ <td><?php echo htmlspecialchars($field['Comment']);?></td>
</tr>
<?php
if ($style == 'even') {
@@ -337,15 +338,15 @@ if (isset($_REQUEST['snapshot'])) {
}
?>
<tr class="noclick <?php echo $style; ?>">
- <td><b><?php echo $index['Key_name'];?></b></td>
- <td><?php echo $index['Index_type'];?></td>
+ <td><b><?php echo htmlspecialchars($index['Key_name']);?></b></td>
+ <td><?php echo htmlspecialchars($index['Index_type']);?></td>
<td><?php echo $str_unique;?></td>
<td><?php echo $str_packed;?></td>
- <td><?php echo $index['Column_name'];?></td>
- <td><?php echo $index['Cardinality'];?></td>
- <td><?php echo $index['Collation'];?></td>
- <td><?php echo $index['Null'];?></td>
- <td><?php echo $index['Comment'];?></td>
+ <td><?php echo htmlspecialchars($index['Column_name']);?></td>
+ <td><?php echo htmlspecialchars($index['Cardinality']);?></td>
+ <td><?php echo htmlspecialchars($index['Collation']);?></td>
+ <td><?php echo htmlspecialchars($index['Null']);?></td>
+ <td><?php echo htmlspecialchars($index['Comment']);?></td>
</tr>
<?php
if ($style == 'even') {
@@ -372,10 +373,10 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
?>
<h3><?php echo __('Tracking report');?> [<a href="tbl_tracking.php?<?php echo $url_query;?>"><?php echo __('Close');?></a>]</h3>
- <small><?php echo __('Tracking statements') . ' ' . $data['tracking']; ?></small><br/>
+ <small><?php echo __('Tracking statements') . ' ' . htmlspecialchars($data['tracking']); ?></small><br/>
<br/>
- <form method="post" action="tbl_tracking.php?<?php echo $url_query; ?>&report=true&version=<?php echo $_REQUEST['version'];?>">
+ <form method="post" action="tbl_tracking.php<?php echo PMA_generate_common_url($url_params + array('report' => 'true', 'version' => $_REQUEST['version'])); ?>">
<?php
$str1 = '<select name="logtype">' .
@@ -383,9 +384,9 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
'<option value="data"' . ($selection_data ? ' selected="selected"' : ''). '>' . __('Data only') . '</option>' .
'<option value="schema_and_data"' . ($selection_both ? ' selected="selected"' : '') . '>' . __('Structure and data') . '</option>' .
'</select>';
- $str2 = '<input type="text" name="date_from" value="' . $_REQUEST['date_from'] . '" size="19" />';
- $str3 = '<input type="text" name="date_to" value="' . $_REQUEST['date_to'] . '" size="19" />';
- $str4 = '<input type="text" name="users" value="' . $_REQUEST['users'] . '" />';
+ $str2 = '<input type="text" name="date_from" value="' . htmlspecialchars($_REQUEST['date_from']) . '" size="19" />';
+ $str3 = '<input type="text" name="date_to" value="' . htmlspecialchars($_REQUEST['date_to']) . '" size="19" />';
+ $str4 = '<input type="text" name="users" value="' . htmlspecialchars($_REQUEST['users']) . '" />';
$str5 = '<input type="submit" name="list_report" value="' . __('Go') . '" />';
printf(__('Show %s with dates from %s to %s by user %s %s'), $str1, $str2, $str3, $str4, $str5);
@@ -422,8 +423,8 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
?>
<tr class="noclick <?php echo $style; ?>">
<td><small><?php echo $i;?></small></td>
- <td><small><?php echo $entry['date'];?></small></td>
- <td><small><?php echo $entry['username']; ?></small></td>
+ <td><small><?php echo htmlspecialchars($entry['date']);?></small></td>
+ <td><small><?php echo htmlspecialchars($entry['username']); ?></small></td>
<td><?php echo $statement; ?></td>
</tr>
<?php
@@ -473,8 +474,8 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
?>
<tr class="noclick <?php echo $style; ?>">
<td><small><?php echo $i; ?></small></td>
- <td><small><?php echo $entry['date']; ?></small></td>
- <td><small><?php echo $entry['username']; ?></small></td>
+ <td><small><?php echo htmlspecialchars($entry['date']); ?></small></td>
+ <td><small><?php echo htmlspecialchars($entry['username']); ?></small></td>
<td><?php echo $statement; ?></td>
</tr>
<?php
@@ -493,7 +494,7 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
}
?>
</form>
- <form method="post" action="tbl_tracking.php?<?php echo $url_query; ?>&report=true&version=<?php echo $_REQUEST['version'];?>">
+ <form method="post" action="tbl_tracking.php<?php echo PMA_generate_common_url($url_params + array('report' => 'true', 'version' => $_REQUEST['version'])); ?>">
<?php
printf(__('Show %s with dates from %s to %s by user %s %s'), $str1, $str2, $str3, $str4, $str5);
@@ -506,11 +507,11 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
$str_export2 = '<input type="submit" name="report_export" value="' . __('Go') .'" />';
?>
</form>
- <form method="post" action="tbl_tracking.php?<?php echo $url_query; ?>&report=true&version=<?php echo $_REQUEST['version'];?>">
- <input type="hidden" name="logtype" value="<?php echo $_REQUEST['logtype'];?>" />
- <input type="hidden" name="date_from" value="<?php echo $_REQUEST['date_from'];?>" />
- <input type="hidden" name="date_to" value="<?php echo $_REQUEST['date_to'];?>" />
- <input type="hidden" name="users" value="<?php echo $_REQUEST['users'];?>" />
+ <form method="post" action="tbl_tracking.php<?php echo PMA_generate_common_url($url_params + array('report' => 'true', 'version' => $_REQUEST['version'])); ?>">
+ <input type="hidden" name="logtype" value="<?php echo htmlspecialchars($_REQUEST['logtype']);?>" />
+ <input type="hidden" name="date_from" value="<?php echo htmlspecialchars($_REQUEST['date_from']);?>" />
+ <input type="hidden" name="date_to" value="<?php echo htmlspecialchars($_REQUEST['date_to']);?>" />
+ <input type="hidden" name="users" value="<?php echo htmlspecialchars($_REQUEST['users']);?>" />
<?php
echo "<br/>" . sprintf(__('Export as %s'), $str_export1) . $str_export2 . "<br/>";
?>
@@ -612,11 +613,15 @@ if ($last_version > 0) {
<tr class="noclick <?php echo $style;?>">
<td><?php echo htmlspecialchars($version['db_name']);?></td>
<td><?php echo htmlspecialchars($version['table_name']);?></td>
- <td><?php echo $version['version'];?></td>
- <td><?php echo $version['date_created'];?></td>
- <td><?php echo $version['date_updated'];?></td>
+ <td><?php echo htmlspecialchars($version['version']);?></td>
+ <td><?php echo htmlspecialchars($version['date_created']);?></td>
+ <td><?php echo htmlspecialchars($version['date_updated']);?></td>
<td><?php echo $version_status;?></td>
- <td> <a href="tbl_tracking.php?<?php echo $url_query;?>&report=true&version=<?php echo $version['version'];?>"><?php echo __('Tracking report');?></a> | <a href="tbl_tracking.php?<?php echo $url_query;?>&snapshot=true&version=<?php echo $version['version'];?>"><?php echo __('Structure snapshot');?></a></td>
+ <td> <a href="tbl_tracking.php<?php echo PMA_generate_common_url($url_params + array('report' => 'true', 'version' => $version['version'])
+);?>"><?php echo __('Tracking report');?></a>
+ | <a href="tbl_tracking.php<?php echo PMA_generate_common_url($url_params + array('snapshot' => 'true', 'version' => $version['version'])
+);?>"><?php echo __('Structure snapshot');?></a>
+ </td>
</tr>
<?php
if ($style == 'even') {
diff --git a/transformation_wrapper.php b/transformation_wrapper.php
index 3699dd0..f04c8ac 100644
--- a/transformation_wrapper.php
+++ b/transformation_wrapper.php
@@ -68,7 +68,7 @@ if (isset($ct) && !empty($ct)) {
header($content_type);
if (isset($cn) && !empty($cn)) {
- header('Content-Disposition: attachment; filename=' . $cn);
+ header('Content-Disposition: attachment; filename=' . PMA_sanitize_filename($cn));
}
if (!isset($resize)) {
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, STABLE, updated. RELEASE_3_4_4-25-g0881b0a
by Marc Delisle 24 Aug '11
by Marc Delisle 24 Aug '11
24 Aug '11
The branch, STABLE has been updated
via 0881b0a7c2d5b2ab4b0ded1c0f68ef2687e775f0 (commit)
via b5686c68ab98b2916f187daff90f8b8f392ce394 (commit)
via dd81a0fce80b7766e7305c16c7b2cf32207d80fd (commit)
via f00c57bdf3669d7471b30e6750f6762d2e01947b (commit)
via 4e5c583dcfdd6307f1093f80a9e1d1ff0480cc7d (commit)
via c547703b1089bff62b238a908d8559ca3ad845f1 (commit)
via b659fbeb128b3235738d6fd787cab096ddc3a591 (commit)
via 0f5f2d960184db7333ecf7d52da406cae306412b (commit)
via 39edf6e1fbe4a39f6fec0919d60eca5dfc2708ff (commit)
via 3d8fddceb0f084d4b77c58c48a98e002db6baa6a (commit)
via 2b0d12b2deb1b6b5c4073ecaa7971cb0bbb83389 (commit)
via ec848d825ffe896b96b6c3e4b8c7d4c12aadd310 (commit)
via 09b30b8b6e462aafc24cc32a78491cd9513305c6 (commit)
via 08ee54d4a43b1bd6eff1e6695ff8553e6f26b37a (commit)
via 3534dda30a587eafe3bf5016f2fb302dbc224c2e (commit)
via 06bfdd7ca6d76335f45d53134770979d7d25d739 (commit)
via 9a268729f0cb0aeb2d124b58ca22ef8e7bd7baf6 (commit)
via 201ad07ea8883fc8c3a18227a656ea56fe7b18fc (commit)
via 5f9c187010dcf2b51bf3dee516789b6fae9f2363 (commit)
via 54398f8a124702e30820bc4636040dda1db6b71b (commit)
via bea5556023b4561c23e82f5005059c5fb7b1cde8 (commit)
via 36c0339eb00394d4c51ccbf82a20feae7b70fb18 (commit)
via 58b48a3d4555d0469ee6fed361a9cf8820fb8c9d (commit)
via 9eba5726bd809ab874fc29360ac6ff351d86335b (commit)
via 3ec3c7ee1766331a25899483ff78ff468516fc2e (commit)
via 40d7c3b8baa84c474af5f710e60351b05330f3c6 (commit)
via b185ca88f7c8241804cff13a2b315fc3d1222a38 (commit)
via 2cc22c8aba33ad12b3d98905d6dfc29f7c878837 (commit)
via 70083ad58346ff7190bcd8e56b63ab92f6abfa40 (commit)
via 65d962d39703b412dc482be47e092f97933eb8e0 (commit)
via 6d0f28b425dc9f975543301c4b194dd6fbdd494d (commit)
via ed88c4a7b68c8efd764a364d1a9579aa762ebdaa (commit)
via 58d25ddcb8a036743e32879c9320dcd802626082 (commit)
via a546479680cd1da8af6812ed0eef83b390bab07f (commit)
via 95927229deb417c2df4fad3baccaf9de575c70b5 (commit)
via 90a232d8fb9b6e321481cac4c3db21767a3f1189 (commit)
via 39cb4d4798f495db25bf65dda95fc8c4e9893367 (commit)
via 2ec0de3a9f8d77c750f02c27ba8d83b407a87ea5 (commit)
via c4ecddb5a2df58f26675f0162d8f2335b71bfbd5 (commit)
via 041cd7e7d2dfa95dd055da6fd2eb5308902fda95 (commit)
via 58d86350c439c2ea06d58ba37f723e6e8a8f1abf (commit)
via 5217946601b64ee6e92f97443cf4e515c03c0c27 (commit)
via 4d1540cc1c8136040968bcfb3a4629aad2551b3a (commit)
via 614639a5c5d94b9c693f7ec6e32c1a6e71a7e203 (commit)
via 9129444381fef0d9b57466219f21deae8fc95582 (commit)
via 31df8ebb5dd444fc40d566407d9b2a00eee8d1b9 (commit)
via edf46c8022020099ac953b2e16f36f4f99687d87 (commit)
via 43c7f939c31e9304cacbbc456d999d9d6afc8682 (commit)
via 5e28dbea224d21b2c03cd325ef67f36b42d2b58d (commit)
via f09d19cfa3bd2f31185848adfdeb808576396851 (commit)
via e8ee4eb11b784b56d51bf4d37dd4811e8d213569 (commit)
via 9e224184d786068317b801291c8f960109f0bdc5 (commit)
via c2dd99965dea7756e9de5a58100c1c701ef83de3 (commit)
via 341dc1296f8e3fe6b80a9b5f5e752cfd868bdb10 (commit)
via 3336bf363625d3512da5f32d5d9f276a64dae02b (commit)
via 7ecb1abaa49142a7e0b3f6d6e37cb4855e17ddf9 (commit)
from 35de0db1e6c61c0fcb104144a6c31c3304efc79b (commit)
- Log -----------------------------------------------------------------
commit 0881b0a7c2d5b2ab4b0ded1c0f68ef2687e775f0
Merge: 35de0db b5686c6
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Aug 24 12:46:31 2011 -0400
Merge branch 'MAINT_3_4_4' into STABLE
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 20 +
Documentation.html | 4 +-
README | 2 +-
db_operations.php | 11 -
export.php | 1 +
js/export.js | 25 +-
js/functions.js | 4 +-
js/indexes.js | 12 +-
js/server_privileges.js | 1 +
js/sql.js | 5 +-
libraries/Config.class.php | 2 +-
libraries/config.default.php | 5 +-
libraries/core.lib.php | 8 +-
libraries/display_export.lib.php | 11 +-
libraries/display_import.lib.php | 6 +-
libraries/display_tbl.lib.php | 2 +-
libraries/export/codegen.php | 340 ++--
libraries/export/xml.php | 43 +-
libraries/header.inc.php | 5 +-
libraries/sanitizing.lib.php | 18 +
libraries/schema/Dia_Relation_Schema.class.php | 1 +
libraries/schema/Eps_Relation_Schema.class.php | 1 +
libraries/schema/Pdf_Relation_Schema.class.php | 2 +
libraries/schema/Svg_Relation_Schema.class.php | 1 +
libraries/schema/Visio_Relation_Schema.class.php | 1 +
libraries/select_lang.lib.php | 2 +
libraries/sqlparser.lib.php | 4 +-
po/af.po | 2 +-
po/ar.po | 118 +-
po/az.po | 2 +-
po/be.po | 2 +-
po/be(a)latin.po | 2 +-
po/bg.po | 316 ++--
po/bn.po | 2 +-
po/{ug.po => br.po} | 2140 +++++++++++-----------
po/bs.po | 2 +-
po/ca.po | 2 +-
po/cs.po | 2 +-
po/cy.po | 2 +-
po/da.po | 1294 ++++++++-----
po/de.po | 2 +-
po/el.po | 2 +-
po/en_GB.po | 2 +-
po/es.po | 2 +-
po/et.po | 2 +-
po/eu.po | 2 +-
po/fa.po | 2 +-
po/fi.po | 2 +-
po/fr.po | 2 +-
po/gl.po | 2 +-
po/he.po | 2 +-
po/hi.po | 2 +-
po/hr.po | 2 +-
po/hu.po | 2 +-
po/id.po | 2 +-
po/it.po | 2 +-
po/ja.po | 2 +-
po/ka.po | 2 +-
po/ko.po | 2 +-
po/lt.po | 2 +-
po/lv.po | 2 +-
po/mk.po | 2 +-
po/ml.po | 2 +-
po/mn.po | 2 +-
po/ms.po | 2 +-
po/nb.po | 2 +-
po/nl.po | 2 +-
po/pl.po | 2 +-
po/pt.po | 2 +-
po/pt_BR.po | 111 +-
po/ro.po | 2 +-
po/ru.po | 2 +-
po/si.po | 2 +-
po/sk.po | 67 +-
po/sl.po | 2 +-
po/sq.po | 2 +-
po/sr.po | 2 +-
po/sr(a)latin.po | 2 +-
po/sv.po | 2 +-
po/ta.po | 2 +-
po/te.po | 2 +-
po/th.po | 2 +-
po/tr.po | 2 +-
po/tt.po | 2 +-
po/ug.po | 2 +-
po/uk.po | 94 +-
po/ur.po | 2 +-
po/uz.po | 2 +-
po/uz(a)latin.po | 2 +-
po/zh_CN.po | 2 +-
po/zh_TW.po | 2 +-
setup/index.php | 4 +-
setup/lib/index.lib.php | 2 +-
sql.php | 2 +-
tbl_get_field.php | 3 +-
tbl_indexes.php | 14 +-
tbl_structure.php | 8 +-
tbl_tracking.php | 75 +-
transformation_wrapper.php | 2 +-
99 files changed, 2717 insertions(+), 2184 deletions(-)
copy po/{ug.po => br.po} (87%)
diff --git a/ChangeLog b/ChangeLog
index 05d5fe5..cc9c6f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,26 @@
phpMyAdmin - ChangeLog
======================
+3.4.4.0 (2011-08-24)
+- bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes
+- bug #3323101 [parser] Invalid escape sequence in SQL parser
+- bug #3348995 [config] $cfg['Export']['asfile'] set to false does not select asText option
+- bug #3340151 [export] Working SQL query exports error page
+- bug #3353649 [interface] "Create an index on X columns" form not validated
+- bug #3350790 [interface] JS error in Table->Structure->Index->Edit
+- bug #3353811 [interface] Info message has "error" class
+- bug #3357837 [interface] TABbing through a NULL field in the inline mode resets NULL
+- remove version number in /setup
+- bug #3367993 [usability] Missing "Generate Password" button
+- bug #3363221 [display] Missing Server Parameter on inline sql query
+- bug #3367986 [navi] Drop field -> lost active table
+- remove misleading comment on the "Rename database" interface
+- bug #3374374 [interface] Fix footnote for inexact count while browsing
+- bug #3372807 [interface] Fix security warning link in setup
+- bug #3374347 [display] Backquotes in normal text on import page
+- bug #3358750 [core] With Suhosin, urls are too long in edit links
+- [security] Missing sanitization on the table, column and index names leads to XSS vulnerabilities, see PMASA-2011-13
+
3.4.3.2 (2011-07-23)
- [security] Fixed XSS vulnerability, see PMASA-2011-9
- [security] Fixed local file inclusion vulnerability, see PMASA-2011-10
diff --git a/Documentation.html b/Documentation.html
index 15f8000..fd0f6b8 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -9,7 +9,7 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>phpMyAdmin 3.4.3.2 - Documentation</title>
+ <title>phpMyAdmin 3.4.4 - Documentation</title>
<link rel="stylesheet" type="text/css" href="docs.css" />
</head>
@@ -17,7 +17,7 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78
<div id="header">
<h1>
<a href="http://www.phpmyadmin.net/">php<span class="myadmin">MyAdmin</span></a>
- 3.4.3.2
+ 3.4.4
Documentation
</h1>
</div>
diff --git a/README b/README
index 65f7c52..ab29c94 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
phpMyAdmin - Readme
===================
-Version 3.4.3.2
+Version 3.4.4
A set of PHP-scripts to manage MySQL over the web.
diff --git a/db_operations.php b/db_operations.php
index f48ba27..ebd9333 100644
--- a/db_operations.php
+++ b/db_operations.php
@@ -405,17 +405,6 @@ if ($db != 'mysql') {
?>
</legend>
<input id="new_db_name" type="text" name="newname" size="30" class="textfield" value="" />
- <?php
- echo '(' . __('Command') . ': ';
- /**
- * @todo (see explanations above in a previous todo)
- */
- //if (PMA_MYSQL_INT_VERSION >= XYYZZ) {
- // echo 'RENAME DATABASE';
- //} else {
- echo 'INSERT INTO ... SELECT';
- //}
- echo ')'; ?>
</fieldset>
<fieldset class="tblFooters">
<input id="rename_db_input" type="submit" value="<?php echo __('Go'); ?>" />
diff --git a/export.php b/export.php
index 7da25fc..100269f 100644
--- a/export.php
+++ b/export.php
@@ -343,6 +343,7 @@ if (!$save_on_server) {
// (avoid rewriting data containing HTML with anchors and forms;
// this was reported to happen under Plesk)
@ini_set('url_rewriter.tags','');
+ $filename = PMA_sanitize_filename($filename);
header('Content-Type: ' . $mime_type);
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
diff --git a/js/export.js b/js/export.js
index 1cf9de5..3fd3c00 100644
--- a/js/export.js
+++ b/js/export.js
@@ -89,18 +89,23 @@ $(document).ready(function() {
/**
* Toggles the disabling of the "save to file" options
*/
+function toggle_save_to_file() {
+ if($("#radio_dump_asfile:checked").length == 0) {
+ $("#ul_save_asfile > li").fadeTo('fast', 0.4);
+ $("#ul_save_asfile > li > input").attr('disabled', 'disabled');
+ $("#ul_save_asfile > li> select").attr('disabled', 'disabled');
+ } else {
+ $("#ul_save_asfile > li").fadeTo('fast', 1);
+ $("#ul_save_asfile > li > input").removeAttr('disabled');
+ $("#ul_save_asfile > li> select").removeAttr('disabled');
+ }
+}
+
$(document).ready(function() {
+ toggle_save_to_file();
$("input[type='radio'][name='output_format']").change(function() {
- if($("#radio_dump_asfile:checked").length == 0) {
- $("#ul_save_asfile > li").fadeTo('fast', 0.4);
- $("#ul_save_asfile > li > input").attr('disabled', 'disabled');
- $("#ul_save_asfile > li> select").attr('disabled', 'disabled');
- } else {
- $("#ul_save_asfile > li").fadeTo('fast', 1);
- $("#ul_save_asfile > li > input").removeAttr('disabled');
- $("#ul_save_asfile > li> select").removeAttr('disabled');
- }
- });
+ toggle_save_to_file();
+ });
});
/**
diff --git a/js/functions.js b/js/functions.js
index eea8573..75fd677 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1117,6 +1117,7 @@ function changeMIMEType(db, table, reference, mime_type)
*/
$(document).ready(function(){
$(".inline_edit_sql").live('click', function(){
+ var server = $(this).prev().find("input[name='server']").val();
var db = $(this).prev().find("input[name='db']").val();
var table = $(this).prev().find("input[name='table']").val();
var token = $(this).prev().find("input[name='token']").val();
@@ -1132,7 +1133,8 @@ $(document).ready(function(){
$(this).click(function(){
sql_query = $(this).prev().val();
window.location.replace("import.php"
- + "?db=" + encodeURIComponent(db)
+ + "?ser + encodeURIComponent(db) ; >" />