mirror of
https://github.com/vrana/adminer.git
synced 2025-08-10 16:44:17 +02:00
Send 404 for invalid database and schema
This commit is contained in:
@@ -3,6 +3,7 @@ function connect_error() {
|
|||||||
global $adminer, $connection, $token, $error, $drivers;
|
global $adminer, $connection, $token, $error, $drivers;
|
||||||
$databases = array();
|
$databases = array();
|
||||||
if (DB != "") {
|
if (DB != "") {
|
||||||
|
header("HTTP/1.1 404 Not Found");
|
||||||
page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), true);
|
page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), true);
|
||||||
} else {
|
} else {
|
||||||
if ($_POST["db"] && !$error) {
|
if ($_POST["db"] && !$error) {
|
||||||
@@ -75,6 +76,7 @@ if (support("scheme") && DB != "" && $_GET["ns"] !== "") {
|
|||||||
redirect(preg_replace('~ns=[^&]*&~', '', ME) . "ns=" . get_schema());
|
redirect(preg_replace('~ns=[^&]*&~', '', ME) . "ns=" . get_schema());
|
||||||
}
|
}
|
||||||
if (!set_schema($_GET["ns"])) {
|
if (!set_schema($_GET["ns"])) {
|
||||||
|
header("HTTP/1.1 404 Not Found");
|
||||||
page_header(lang('Schema') . ": " . h($_GET["ns"]), lang('Invalid schema.'), true);
|
page_header(lang('Schema') . ": " . h($_GET["ns"]), lang('Invalid schema.'), true);
|
||||||
page_footer("ns");
|
page_footer("ns");
|
||||||
exit;
|
exit;
|
||||||
|
@@ -6,6 +6,7 @@ Don't check previous checkbox on added column in create table (bug #3614245)
|
|||||||
Order table list by name
|
Order table list by name
|
||||||
Verify UTF-8 encoding of CSV import
|
Verify UTF-8 encoding of CSV import
|
||||||
Notify user about expired master password for permanent login
|
Notify user about expired master password for permanent login
|
||||||
|
Send 404 for invalid database and schema
|
||||||
MySQL: Speed up updating rows without numeric or UTF-8 primary key
|
MySQL: Speed up updating rows without numeric or UTF-8 primary key
|
||||||
PostgreSQL: Fix detecting oid column in PDO
|
PostgreSQL: Fix detecting oid column in PDO
|
||||||
PostgreSQL: Handle timestamp types (bug #3614086)
|
PostgreSQL: Handle timestamp types (bug #3614086)
|
||||||
|
Reference in New Issue
Block a user