1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/10198] validate_config_vars() improperly validates multibyte strings

PHPBB3-10198
This commit is contained in:
rxu
2011-06-05 23:02:56 +08:00
committed by Nils Adermann
parent 116744d4e5
commit eb0ffd3503

View File

@@ -402,7 +402,7 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
switch ($validator[$type])
{
case 'string':
$length = strlen($cfg_array[$config_name]);
$length = utf8_strlen($cfg_array[$config_name]);
// the column is a VARCHAR
$validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255;