Plugin for Adminer (updated for version 5.3), restricted login to config-defined server
Based on official (but not working at this time) login-servers for Adminer with enhancements.
And inspired by CrazyMax's login-servers-enhanced
- This plugin restricts user to connect only to ONE predefined server.
- User cannot choose anything. Only fill username and password. (other fields are not displayed nor send over network)
- User cannot (ab)use your server with your Adminer to connect somewhere else.
Copy adminer-plugins/forced-server.php in the plugins folder.
Follow the instructions on the official plugins page.
Then just add new AdminerForcedServer to the array in adminer-plugins.php:
<?php
// adminer-plugins.php
return array(
new AdminerForcedServer(array('driver' => 'server', 'server' => 'localhost')),
// You can specify all plugins here or just the ones needing configuration.
);
?>You must set array with keys 'driver' and 'server'.
Value for the driver is usually 'server'.
Value for server can be localhost, IP address or hostname of target server.
Apache-2.0. See LICENSE for more details.