mirror of
https://github.com/vrana/adminer.git
synced 2026-02-27 17:11:22 +01:00
Protection against big POST data
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@373 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -65,14 +65,15 @@ while ($row = $result->fetch_assoc()) {
|
||||
}
|
||||
$result->free();
|
||||
|
||||
if ($error) {
|
||||
echo "<p class='error'>" . lang('Unable to operate table') . ": " . htmlspecialchars($error) . "</p>\n";
|
||||
}
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
ksort($row["fields"]);
|
||||
$row["fields"] = array_values($row["fields"]);
|
||||
if ($_POST["add"]) {
|
||||
array_splice($row["fields"], key($_POST["add"]), 0, array(array()));
|
||||
} elseif (!$_POST["drop_col"]) {
|
||||
echo "<p class='error'>" . lang('Unable to operate table') . ": " . htmlspecialchars($error) . "</p>\n";
|
||||
}
|
||||
if ($row["auto_increment_col"]) {
|
||||
$row["fields"][$row["auto_increment_col"] - 1]["auto_increment"] = true;
|
||||
|
||||
Reference in New Issue
Block a user