Exception to CSRF can be abused in Editor
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@852 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
ed2c27c249
commit
21c98c49c1
|
@ -162,7 +162,7 @@ if ($dbh->server_info >= 5) {
|
||||||
$db_style[] = 'CREATE+ALTER';
|
$db_style[] = 'CREATE+ALTER';
|
||||||
$table_style[] = 'CREATE+ALTER';
|
$table_style[] = 'CREATE+ALTER';
|
||||||
}
|
}
|
||||||
echo "<tr><th>" . lang('Output') . "<td>$dump_output\n";
|
echo "<tr><th>" . lang('Output') . "<td><input type='hidden' name='token' value='$token'>$dump_output\n";
|
||||||
echo "<tr><th>" . lang('Format') . "<td>$dump_format\n";
|
echo "<tr><th>" . lang('Format') . "<td>$dump_format\n";
|
||||||
echo "<tr><th>" . lang('Database') . "<td><select name='db_style'><option>" . optionlist($db_style, (strlen($_GET["db"]) ? '' : 'CREATE')) . "</select>\n";
|
echo "<tr><th>" . lang('Database') . "<td><select name='db_style'><option>" . optionlist($db_style, (strlen($_GET["db"]) ? '' : 'CREATE')) . "</select>\n";
|
||||||
echo "<tr><th>" . lang('Tables') . "<td><select name='table_style'><option>" . optionlist($table_style, 'DROP+CREATE') . "</select>\n";
|
echo "<tr><th>" . lang('Tables') . "<td><select name='table_style'><option>" . optionlist($table_style, 'DROP+CREATE') . "</select>\n";
|
||||||
|
|
|
@ -99,6 +99,6 @@ include "./include/export.inc.php";
|
||||||
$confirm = " onclick=\"return confirm('" . lang('Are you sure?') . "');\"";
|
$confirm = " onclick=\"return confirm('" . lang('Are you sure?') . "');\"";
|
||||||
$token = $_SESSION["tokens"][$_GET["server"]];
|
$token = $_SESSION["tokens"][$_GET["server"]];
|
||||||
$error = ($_POST
|
$error = ($_POST
|
||||||
? ($_POST["token"] == $token || isset($_GET["dump"]) ? "" : lang('Invalid CSRF token. Send the form again.'))
|
? ($_POST["token"] == $token ? "" : lang('Invalid CSRF token. Send the form again.'))
|
||||||
: ($_SERVER["REQUEST_METHOD"] != "POST" ? "" : lang('Too big POST data. Reduce the data or increase the "post_max_size" configuration directive.')) // posted form with no data means that post_max_size exceeded because Adminer always sends token at least
|
: ($_SERVER["REQUEST_METHOD"] != "POST" ? "" : lang('Too big POST data. Reduce the data or increase the "post_max_size" configuration directive.')) // posted form with no data means that post_max_size exceeded because Adminer always sends token at least
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue