1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Error log/JSON error

Discussion in 'Resolved Bug Reports' started by Kent, Jun 20, 2012.

  1. Kent

    Kent 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:
    /css.php?css=%C0%AE%C0%AF&dir[]=test

    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:
    /css.php?css=こんにちは&dir[]=test
    /css.php?css=%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF&dir[]=test
     
  2. Mike

    Mike XenForo Developer Staff Member

    Fixed now - there was some broken UTF-8 validation being used in places.
     
    EgyKit and Slavik like this.

Share This Page