1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-14 18:44:02 +02:00

Allow specifying external links (bug #3392685)

This commit is contained in:
Jakub Vrana
2013-01-10 17:59:43 -08:00
parent 61dc40a512
commit f6e1c589f9
6 changed files with 37 additions and 3 deletions

17
plugins/links-direct.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
/** Avoid redirecting of external links through adminer.org and disclose the URL of installed Adminer to visited links
* @link http://www.adminer.org/plugins/#use
* @author Jakub Vrana, http://www.vrana.cz/
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/
class AdminerLinksDirect {
function selectLink($val, $field) {
if (is_url($val)) {
return $val;
}
}
}

View File

@@ -191,6 +191,11 @@ class AdminerPlugin extends Adminer {
return $this->_applyPlugin(__FUNCTION__, $args);
}
function selectLink() {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}
function selectVal() {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);