You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Transformers edge cases: trim with a multibyte charlist, convert_value keep_missing, multi_replace and conditions with numeric keys, hash of an array, options validated with the first value #398
Edge cases of several transformers found by fuzzing:
trim: a multibyte character in charlist produces invalid UTF-8, trim() removing bytes (charlist: 'é' on "Été" gives "\x89t").
convert_value: with keep_missing and auto_cast, the value cast to string is returned instead of the input (true gives '1'), while the documentation promises the input itself.
multi_replace: a numeric key of replace_mapping ('1', '10', an int in PHP) throws a TypeError, and so does a replacement given as an array (only when transforming).
Conditions (ConditionTrait: filter, column_aggregator, array_filter, unset): the list form not_empty: ['[email]'], described by the documentation ("or just property path for empty and not_empty"), and a numeric key of match throw a TypeError.
hash: an array is hashed as the string Array, which gives the same hash for every array. A non-Stringable object throws a raw Error.
Options validated too late: an empty delimiter for explode, an invalid format for sprintf (e.g. a % alone) and an unknown class for instantiate are only detected with the first value, or never, depending on the data.
Found during the audit v3 (audit-v3-angles.md#198 to #203; the input policy of slugify and date_parser from #202 goes with their own tickets).
Activity
Merge pull request #399 from cleverage/398