]> git.joonet.de Git - adminer.git/commitdiff
Send 404 for invalid database and schema
authorJakub Vrana <jakub@vrana.cz>
Mon, 24 Jun 2013 12:23:14 +0000 (05:23 -0700)
committerJakub Vrana <jakub@vrana.cz>
Mon, 24 Jun 2013 12:43:13 +0000 (05:43 -0700)
adminer/include/connect.inc.php
changes.txt

index 637abef9760a6e7afec3f1bca062a8430f598fb9..3ee717f5bf5283b70acc5eda9c7cdb1e9aea65f9 100644 (file)
@@ -3,6 +3,7 @@ function connect_error() {
        global $adminer, $connection, $token, $error, $drivers;
        $databases = array();
        if (DB != "") {
+               header("HTTP/1.1 404 Not Found");
                page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), true);
        } else {
                if ($_POST["db"] && !$error) {
@@ -75,6 +76,7 @@ if (support("scheme") && DB != "" && $_GET["ns"] !== "") {
                redirect(preg_replace('~ns=[^&]*&~', '', ME) . "ns=" . get_schema());
        }
        if (!set_schema($_GET["ns"])) {
+               header("HTTP/1.1 404 Not Found");
                page_header(lang('Schema') . ": " . h($_GET["ns"]), lang('Invalid schema.'), true);
                page_footer("ns");
                exit;
index dff0412467a5ae3b1fec089ff4d44dbbdf7a6cc8..e982e4f5a6fc0f8a6a4957d3f853209788a79244 100644 (file)
@@ -6,6 +6,7 @@ Don't check previous checkbox on added column in create table (bug #3614245)
 Order table list by name
 Verify UTF-8 encoding of CSV import
 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
 PostgreSQL: Fix detecting oid column in PDO
 PostgreSQL: Handle timestamp types (bug #3614086)