Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2998

JsonWriter truncation doesn't take surrogates into account

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.14.0
    • 2.14.1
    • JsonTemplateLayout
    • None

    Description

      JsonWriter of JsonTemplateLayout works on char-by-char basis, even while truncating excessive input. This approach might leave the truncated string in a state such that the last char (which will be followed by truncatedStringSuffix) might be the high surrogate of a surrogate pair. This incomplete char needs to be removed.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            vy Volkan Yazici
            vy Volkan Yazici
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment