1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 16:44:17 +02:00

added filter_input()

added `filter_input()` accessing superglobals var
This commit is contained in:
Andrea
2020-02-20 21:10:48 +01:00
committed by GitHub
parent cd2fb4acee
commit 679c602b6b

View File

@@ -18,16 +18,18 @@ class AdminerFkDisable
}
public function head(){
if (!isset($_GET['sql'])) {
$sql = filter_input(INPUT_GET, 'sql');
if (!isset($sql)) {
return;
}
$query = trim($_POST['query']);
$query = trim(filter_input(INPUT_POST, 'query'));
if($_POST['fk_disable']){
if(filter_input(INPUT_POST, 'fk_disable')){
if($query) {
$query = trim($this->deleteAllBetween("-- FK:D0", "-- FK:D1", $query));
$_POST['query'] = "-- FK:D0\nSET FOREIGN_KEY_CHECKS=0;\n-- FK:D1\n\n{$query}\n\n-- FK:D0\nSET FOREIGN_KEY_CHECKS=1;\n-- FK:D1";
$_POST['query'] = "-- FK:D0\nSET FOREIGN_KEY_CHECKS=0;\n-- FK:D1\n\n{$query}\n\n-- FK:D0\n;SET FOREIGN_KEY_CHECKS=1;\n-- FK:D1";
}
$fk_disable_checked = ($_POST['fk_disable']) ? 'checked="checked"' : "";
}