From 99903101d9ce64fe52b650ad820f959badbaa3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 22 Jul 2016 15:47:38 +0200 Subject: [PATCH] Enfornce numeric field length when creating table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- ChangeLog | 1 + libraries/Table.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 364e8c3ca2..cc1653d740 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ phpMyAdmin - ChangeLog 4.6.4 (not yet released) - issue Include X-Robots-Tag header in responses +- issue Enfornce numeric field length when creating table 4.6.3 (2016-06-23) - issue #12249 Fixed cookie path on Windows diff --git a/libraries/Table.php b/libraries/Table.php index 7e4a9addf6..07b2047580 100644 --- a/libraries/Table.php +++ b/libraries/Table.php @@ -400,7 +400,7 @@ class Table $pattern = '@^(DATE|TINYBLOB|TINYTEXT|BLOB|TEXT|' . 'MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|SERIAL|BOOLEAN|UUID)$@i'; if ($length != '' && ! preg_match($pattern, $type)) { - $query .= '(' . $length . ')'; + $query .= '(' . intval($length) . ')'; } if ($virtuality) {