fixed a crash with binary "characters" (bug was reported by Joshua Nye)

This commit is contained in:
Loïc Chapeaux
2001-10-26 19:46:40 +00:00
parent 3b42848fda
commit 214d27750f
2 changed files with 13 additions and 0 deletions

View File

@@ -6,6 +6,11 @@ $Id$
$Source$
2001-10-26 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* tbl_change.php3, lines 198-205: fixed a crash with binary "characters".
Bug was reported by Joshua Nye <josh at boxcarmedia.com> to the
phpMyAdmin-devel mailing-list.
2001-10-25 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* user_details.php3, line 1172: fixed bug #474685 (table not found editing
user) thanks to Alister Bulman <alister at users.sourceforge.net>.

View File

@@ -195,6 +195,14 @@ for ($i = 0; $i < $fields_cnt; $i++) {
// The function column
if (isset($row) && isset($row[$field])) {
// loic1: special binary "characters"
if ($is_binary || $is_blob) {
$row[$field] = str_replace("\x00", '\0', $row[$field]);
$row[$field] = str_replace("\x08", '\b', $row[$field]);
$row[$field] = str_replace("\x0a", '\n', $row[$field]);
$row[$field] = str_replace("\x0d", '\r', $row[$field]);
$row[$field] = str_replace("\x1a", '\Z', $row[$field]);
} // end if
$special_chars = htmlspecialchars($row[$field]);
$data = $row[$field];
$backup_field = '<input type="hidden" name="fields_prev[' . urlencode($field) . ']" value="' . urlencode($data) . '" />';