Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.5
-
Fix Version/s: 4.4.6
-
Component/s: CiviCRM API
-
Labels:None
Description
In the function _civicrm_api3_validate_string() (api/v3/utils.php)
The code to count the string length is strlen($value), which count bytes instead of chars. That means non-utf8 strings are not handled because in most cases non-utf8 char takes 2 bytes.
This has a lot of consequences because this function is used multiple times, the most obvious is for exemple we can't create a contact using the API if the name is on 128 chars with at least one accent (é, è, ...)
This affects only the API, "native" forms are ok.