add security
This commit is contained in:
parent
e2858bdb78
commit
1d9a6e1aa0
2 changed files with 18 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -4,3 +4,4 @@
|
||||||
config.php
|
config.php
|
||||||
adminer.sql
|
adminer.sql
|
||||||
adminer.sql.gz
|
adminer.sql.gz
|
||||||
|
servers.php
|
||||||
|
|
|
||||||
19
index.php
19
index.php
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
ini_set('display_errors', 0);
|
//ini_set('display_errors', 0);
|
||||||
ini_set('display_startup_errors', 0);
|
//ini_set('display_startup_errors', 0);
|
||||||
error_reporting(0);
|
//error_reporting(0);
|
||||||
|
|
||||||
//function adminer_object() {
|
//function adminer_object() {
|
||||||
// include_once "./plugin.php";
|
// include_once "./plugin.php";
|
||||||
|
|
@ -18,6 +18,19 @@ error_reporting(0);
|
||||||
// return new AdminerPlugin($plugins);
|
// return new AdminerPlugin($plugins);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
$allowed_servers = [];
|
||||||
|
|
||||||
|
$servers_file = './servers.php';
|
||||||
|
if (is_file($servers_file))
|
||||||
|
{
|
||||||
|
include $servers_file;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($_GET['server']) && $allowed_servers && !in_array($_GET['server'], $allowed_servers))
|
||||||
|
{
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
$_SESSION["lang"] = 'en';
|
$_SESSION["lang"] = 'en';
|
||||||
$_COOKIE["adminer_lang"] = 'en';
|
$_COOKIE["adminer_lang"] = 'en';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue