add security

This commit is contained in:
Pau Capó 2025-07-10 13:40:22 +02:00
parent e2858bdb78
commit 1d9a6e1aa0
2 changed files with 18 additions and 4 deletions

View file

@ -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';