1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-28 07:41:55 +03:00

Merge branch 'QA_5_0'

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes
2020-01-25 21:07:38 +01:00
3 changed files with 19 additions and 2 deletions

View File

@@ -38,6 +38,7 @@ phpMyAdmin - ChangeLog
- issue Fix php notice "Trying to access array offset on value of type bool" on Designer
- issue #13326 Added integer validations on search page
- issue #15200 Fixed server-side HTTPS detection misses support for Forwarded HTTP Extension (RFC 7239)
- issue #15831 Fixed DB names starting with "b" being cut off in <option>, User account page
5.0.1 (2020-01-07)
- issue #15719 Fixed error 500 when browsing a table when $cfg['LimitChars'] used a string and not an int value

View File

@@ -1438,9 +1438,9 @@ class Util
*
* @return string the converted value
*/
public static function convertBitDefaultValue($bit_default_value)
public static function convertBitDefaultValue(string $bit_default_value): string
{
return rtrim(ltrim(htmlspecialchars_decode($bit_default_value, ENT_QUOTES), "b'"), "'");
return (string) preg_replace("/^b'(\d*)'?$/", '$1', htmlspecialchars_decode($bit_default_value, ENT_QUOTES), 1);
}
/**

View File

@@ -369,6 +369,22 @@ class UtilTest extends PmaTestCase
"b'010111010'",
'010111010',
],
'database name starting with b' => [
'big database',
'big database',
],
"database name containing b'" => [
"a b'ig database",
"a b'ig database",
],
'database name in single quotes' => [
"'a*database*name'",
"'a*database*name'",
],
"database name with multiple b'" => [
"b'ens datab'ase'",
"b'ens datab'ase'",
],
];
}