-
Bug
-
Resolution: Done
-
Major
-
8.1 Update 4
-
None
Eap version 8.1.3
jakarta.xml.bind-api version: 4.0.2.redhat-00003
The customer is encountering an issue with the `jakarta.xml.bind.DatatypeConverter#parseBase64Binary` method, which throws an `IllegalArgumentException` with the message "base64 text invalid." when the decoded output is less than 3 bytes. This problem arises due to a discrepancy in the length check within the `DatatypeConverterImpl` class in JBoss EAP 8.x.x environments. The standard implementation in the Jakarta EE JXB API allows for Base64 strings with lengths that are not multiples of 4, whereas the JBoss EAP version enforces a minimum length of 3 bytes.
This apparently incorrect check in DatatypeConverterImpl from https://mvnrepository.com/artifact/jakarta.xml.bind/jakarta.xml.bind-api/4.0.2.redhat-00003
final int buflen = guessLength(text);
if (buflen < 3)
which differs from the standard-implementation of jakarta.xml.bind.DatatypeConverter at https://github.com/jakartaee/jaxb-api/blob/master/api/src/main/java/jakarta/xml/bind/DatatypeConverterImpl.java
if (null == text || text.length() % 4 != 0) { throw new IllegalArgumentException("base64 text invalid."); }
- is incorporated by
-
JBEAP-32011 [GSS](8.1.z) Upgrade jakarta.xml.bind-api from 4.0.2.redhat-00003 to 4.0.4.redhat-00001
-
- Resolved
-