mirror of
https://github.com/vrana/adminer.git
synced 2026-01-24 08:19:55 +01:00
Fix edit by long non-utf8 string (thanks Robert Vlach)
This commit is contained in:
@@ -360,7 +360,8 @@ if (!$columns && support("table")) {
|
||||
$unique_idf = "";
|
||||
foreach ($unique_array as $key => $val) {
|
||||
if (($jush == "sql" || $jush == "pgsql") && strlen($val) > 64) {
|
||||
$key = "MD5(" . (strpos($key, '(') ? $key : idf_escape($key)) . ")"; //! columns looking like functions
|
||||
$key = (strpos($key, '(') ? $key : idf_escape($key)); //! columns looking like functions
|
||||
$key = "MD5(" . ($jush == 'sql' && preg_match("~^utf8_~", $fields[$key]["collation"]) ? $key : "CONVERT($key USING " . charset($connection) . ")") . ")";
|
||||
$val = md5($val);
|
||||
}
|
||||
$unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key));
|
||||
|
||||
Reference in New Issue
Block a user