-
Bug
-
Resolution: Fixed
-
Blocker
-
3.1
-
MOODLE_31_STABLE
-
MOODLE_31_STABLE
-
MDL-53273-master -
Solr, as configured, allows fields no larger than 32766 bytes. In search_solr\document::format_string_for_engine, substr is used to truncate the string.
The problem is this is multi-byte unsafe, and can truncate the string mid-character, which results in Solr server exceptions being thrown.
We can't use mb_substr, because it will return 32766 characters, which can be much larger than that number of bytes.