-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
8
-
x86_64
-
linux_ubuntu
FULL PRODUCT VERSION :
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
A DESCRIPTION OF THE PROBLEM :
The specification for java.util.Base64 MIME decoder says: "All line separators or other characters not found in the base64 alphabet table are ignored in decoding operation." This does not hold for example for input "TQ=*" which throws the following exception:
Exception in thread "main" java.lang.IllegalArgumentException: Input byte array has wrong 4-byte ending unit
at java.util.Base64$Decoder.decode0(Base64.java:704)
at java.util.Base64$Decoder.decode(Base64.java:526)
at java.util.Base64$Decoder.decode(Base64.java:549)
REGRESSION. Last worked in version 8u112
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public static void main(String[] args) {
Base64.getMimeDecoder().decode("TQ=*");
// or
Base64.getMimeDecoder().decode("TQ=");
}
---------- END SOURCE ----------
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
A DESCRIPTION OF THE PROBLEM :
The specification for java.util.Base64 MIME decoder says: "All line separators or other characters not found in the base64 alphabet table are ignored in decoding operation." This does not hold for example for input "TQ=*" which throws the following exception:
Exception in thread "main" java.lang.IllegalArgumentException: Input byte array has wrong 4-byte ending unit
at java.util.Base64$Decoder.decode0(Base64.java:704)
at java.util.Base64$Decoder.decode(Base64.java:526)
at java.util.Base64$Decoder.decode(Base64.java:549)
REGRESSION. Last worked in version 8u112
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public static void main(String[] args) {
Base64.getMimeDecoder().decode("TQ=*");
// or
Base64.getMimeDecoder().decode("TQ=");
}
---------- END SOURCE ----------