-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Base64 encoding with non ASCII characters results in ArrayIndexOutOfBoundException #3803
Comments
|
The easiest way to fix it, would be to replace org.glassfish.jersey.internal.util.Base64 with java.util.Base64. That would affect about 10 files. (I could try to do that, but I'm not familiar with github yet.) Btw. in the test classes the behavior not to support bytes > 127 seems to be intended. Is there any reason for that? |
@srbala Why deprecate? The usual contract is that whatever is internal package is not to be used by users, it can be changed/dropped any release... |
In that case, class can be dropped. |
* Replaced core-common.src.main.java.org.glassfish.jersey.internal.util.Base64 with java.util.Base64 * fixed conversion to String after decoding of Base64 encode message Signed-off-by: Michael Durawa <[email protected]>
…ipse-ee4j#3829) * Replaced core-common.src.main.java.org.glassfish.jersey.internal.util.Base64 with java.util.Base64 * fixed conversion to String after decoding of Base64 encode message Signed-off-by: Michael Durawa <[email protected]>
This issue can be closed, #3829 was merged, the Base64 class does not exist anymore and a fixed version was released. |
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:
The text was updated successfully, but these errors were encountered: