Skip to content
This repository has been archived by the owner on May 28, 2018. It is now read-only.

Base64 encoding with non ASCII characters results in ArrayIndexOutOfBoundException #3803

Open
mdurawa opened this issue Apr 9, 2018 · 0 comments

Comments

@mdurawa
Copy link

mdurawa commented Apr 9, 2018

To calculate the authentication string in org.glassfish.jersey.client.authentication.BasicAuthenticator the method org.glassfish.jersey.internal.util.Base64.encodeAsString() is used to do the Base64 encoding.
Unfortunately this results in a ArrayIndexOutOfBoundException when the password contains non ASCII characters like § (the paragraph sign) or a German Umlaut.

Some examples:

  • Base64.encodeAsString(new byte[]{(byte)128})
  • Base64.encodeAsString("§")
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant