add security
This commit is contained in:
parent
e2858bdb78
commit
1d9a6e1aa0
2 changed files with 18 additions and 4 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -3,4 +3,5 @@
|
|||
.htpasswd
|
||||
config.php
|
||||
adminer.sql
|
||||
adminer.sql.gz
|
||||
adminer.sql.gz
|
||||
servers.php
|
||||
|
|
|
|||
19
index.php
19
index.php
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
ini_set('display_errors', 0);
|
||||
ini_set('display_startup_errors', 0);
|
||||
error_reporting(0);
|
||||
//ini_set('display_errors', 0);
|
||||
//ini_set('display_startup_errors', 0);
|
||||
//error_reporting(0);
|
||||
|
||||
//function adminer_object() {
|
||||
// include_once "./plugin.php";
|
||||
|
|
@ -18,6 +18,19 @@ error_reporting(0);
|
|||
// 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';
|
||||
$_COOKIE["adminer_lang"] = 'en';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue