SignedJWT.serialize() garbles UTF-8 strings from ClaimsSet

Issue #119 invalid
Danilo Cominotti Marques created an issue

When a Claim that uses extended ASCII characters is specified, e.g.:

claimsSet.setClaim("fullName", "João")

SignedJWT.serialize() produces encoded text that, when decoded, results in garbled text for the aforementioned Claim:

{
    ...
    "fullName": "João",
    ...
}

All the Java source files are encoded in UTF-8 (which is also specified as the default encoding in the Gradle build).

Comments (4)

  1. Danilo Cominotti Marques reporter

    Thank you! Is there any estimate on when this might receive some attention? Currently, this issue is a showstopper that might make us have to switch to another library until a fix is found.

  2. Connect2id OSS

    We're not able to reproduce this bug with extended chars, see the tests in commit 60170b1.

    Are you certain you're inputting the strings in UTF-8?

  3. Connect2id OSS

    We're going to close this issue. Should you think it has not been resolved feel free to reopen it.

    As a side note, multi-byte characters can also be passed escaped in a JSON string.

  4. Log in to comment