diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-06-10 01:23:17 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-06-10 01:23:17 +0200 |
commit | a4f7002995440e2d1f1bf51878d581fa91d15623 (patch) | |
tree | 6d50baf88bafaeac8580435e7dfcbe9caa86e0e6 | |
parent | cdfbd82504c5433241f83de28e1c9567b2f98b4a (diff) | |
parent | 72479e13ab41444db532f8d8e238796e419e07c3 (diff) | |
download | forums-a4f7002995440e2d1f1bf51878d581fa91d15623.tar forums-a4f7002995440e2d1f1bf51878d581fa91d15623.tar.gz forums-a4f7002995440e2d1f1bf51878d581fa91d15623.tar.bz2 forums-a4f7002995440e2d1f1bf51878d581fa91d15623.tar.xz forums-a4f7002995440e2d1f1bf51878d581fa91d15623.zip |
Merge remote-tracking branch 'naderman/ticket/10198' into develop-olympus
* naderman/ticket/10198:
[ticket/10198] range validation for strings should limit characters not bytes
[ticket/10198] validate_config_vars() improperly validates multibyte strings
-rw-r--r-- | phpBB/adm/index.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index 68508bc353..bf4dc37044 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -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; @@ -600,7 +600,7 @@ function validate_range($value_ary, &$error) { case 'string' : $max = (isset($column[1])) ? min($column[1],$type['max']) : $type['max']; - if (strlen($value['value']) > $max) + if (utf8_strlen($value['value']) > $max) { $error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max); } |