mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 09:34:10 +02:00
Escape links
This commit is contained in:
@@ -196,7 +196,7 @@ username.form['auth[driver]'].onchange();
|
|||||||
if (ereg('blob|bytea|raw|file', $field["type"]) && !is_utf8($val)) {
|
if (ereg('blob|bytea|raw|file', $field["type"]) && !is_utf8($val)) {
|
||||||
$return = lang('%d byte(s)', strlen($val));
|
$return = lang('%d byte(s)', strlen($val));
|
||||||
}
|
}
|
||||||
return ($link ? "<a href='$link'>$return</a>" : $return);
|
return ($link ? "<a href='" . h($link) . "'>$return</a>" : $return);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Value conversion used in select and edit
|
/** Value conversion used in select and edit
|
||||||
|
@@ -164,6 +164,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
|||||||
|
|
||||||
function selectVal($val, $link, $field) {
|
function selectVal($val, $link, $field) {
|
||||||
$return = ($val === null ? " " : $val);
|
$return = ($val === null ? " " : $val);
|
||||||
|
$link = h($link);
|
||||||
if (ereg('blob|bytea', $field["type"]) && !is_utf8($val)) {
|
if (ereg('blob|bytea', $field["type"]) && !is_utf8($val)) {
|
||||||
$return = lang('%d byte(s)', strlen($val));
|
$return = lang('%d byte(s)', strlen($val));
|
||||||
if (ereg("^(GIF|\xFF\xD8\xFF|\x89PNG\x0D\x0A\x1A\x0A)", $val)) { // GIF|JPG|PNG, getimagetype() works with filename
|
if (ereg("^(GIF|\xFF\xD8\xFF|\x89PNG\x0D\x0A\x1A\x0A)", $val)) { // GIF|JPG|PNG, getimagetype() works with filename
|
||||||
|
Reference in New Issue
Block a user