Fixed Error log/JSON error


Active member
Viewing an error log via AJAX causes a JSON error if the log contains certain unicode. Viewing the error directly by browsing works without error.
This error occurred from someone scanning my websites for vulnerabilities, not form normal usage.
\xC0\xAE and \xC0\xAF were used, which is a unicode dot and forward slash.

ErrorException: json_encode(): Invalid UTF-8 sequence in argument - library/XenForo/ViewRenderer/Json.php:179

An example error can be made via css.php:

This particular unicode seems to cause errors with JSON anywhere it's used, though not always server errors.

Unicode such as Japanese doesn't cause an error: