Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-164

Content-length set incorrectly for multi-byte encoding

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.840
    • Fix Version/s: 0.9.1252
    • Component/s: {Unused} Packaging
    • Labels:
      None
    • Environment:
      Xwiki running with unicode
    • keywords:
      unicode truncate utf-8 content length
    • Similar issues:

      Description

      Utils.parseTemplate sets the content length to the string length rather than the number of bytes. This ends up truncating the returned data when using a multi-byte encoding scheme such as utf-8. The content length should instead be set to the number of bytes: content.getBytes().length

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wr0ngway Matthew Conway
                Reporter:
                wr0ngway Matthew Conway
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: