Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-880

Hash impls use String.getBytes(), may get non UTF8 bytes

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.1.CR1, 4.2.1.FINAL
    • 4.2.0.Final
    • Core
    • None
    • Low

      According to Sun's Java docs, String.getBytes() will return bytes in the platform's native encoding, which may not be UTF-8. Cross platform (or same platforms configured differently) may end up with problems in the same cluster.

      The fix seems to be replace all String.getBytes() uses with String.getBytes(Charset.forName("UTF-8")) to always force UTF-8 conversion.

      This bug may also apply to other unrelated places in Infinispan, I haven't checked.

              manik_jira Manik Surtani (Inactive)
              diablod3_jira Patrick McFarland (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: