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:
jakubvrana
2008-03-18 10:29:20 +00:00
parent c54ba01361
commit 4d38c7d963
17 changed files with 46 additions and 34 deletions

View File

@@ -24,7 +24,6 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
}
$error = $mysql->error;
}
page_header(lang('Foreign key'), array("table" => $_GET["foreign"]), $_GET["foreign"]);
$tables = array();
@@ -36,6 +35,9 @@ while ($row = $result->fetch_assoc()) {
}
$result->free();
if ($error) {
echo "<p class='error'>" . lang('Unable to operate foreign keys') . ": " . htmlspecialchars($error) . "</p>\n";
}
if ($_POST) {
$row = $_POST;
ksort($row["source"]);
@@ -43,8 +45,6 @@ if ($_POST) {
$row["source"][] = "";
} elseif ($_POST["change"] || $_POST["change-js"]) {
$row["target"] = array();
} else {
echo "<p class='error'>" . lang('Unable to operate foreign keys') . ": " . htmlspecialchars($error) . "</p>\n";
}
} elseif (strlen($_GET["name"])) {
$foreign_keys = foreign_keys($_GET["foreign"]);