Uploaded image for project: 'Guacamole'
  1. Guacamole
  2. GUACAMOLE-1972

Client incorrectly handles Unicode codepoints greater than U+FFFF

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 1.6.1
    • guacamole-client
    • None

    Description

      When accepting input from the browser, Guacamole will try and convert the UTF-16 buffer provided by Javascript into UTF-8 bytes. However the parser does not take into account surrogate pairs – meaning that any Unicode codepoint greater than U+FFFF (e.g. most of the emoji range) will be wrongly treated as two UTF-16 characters, resulting in an invalid byte sequence being sent to the server.

      The proposed fix is to use `String.prototype.codePointAt` instead of `String.prototype.charCodeAt`, along with validation that the codepoint in question is a surrogate pair.

      Attachments

        Activity

          People

            Unassigned Unassigned
            scottp-dpaw Scott Percival
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: