Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.12, 1.16
-
None
-
None
-
Simple JUnit test, on Java 11, unix.
Description
While processing image downloaded from https://www.uniforce.at/wp-content/uploads/uniforce-favicon-rot.svg uniforce-favicon-rot.svg and trying to transcode it to JPEG via JPEGTranscoder I'm getting a org.apache.batik.transcoder.TranscoderException wrapping a org.apache.batik.bridge.BridgeException saying:
The URI "data:image/png;base64,..." on element <image> can't be opened because: PNG URL is corrupt or unsupported variant.
Which is kind of OK if the file can't be processed properly.
The problem is that there is base64 encoded content and the text of a broken URI is about 850600 characters long. Given the nature of Java Exception being wrapped by multiple super types and containing all kind of information and stacktrace, the sheer size of the Exception instance is enormous.
The org.apache.batik.bridge.UserAgentAdapter#getBrokenLinkDocument method called inside
org.apache.batik.bridge.SVGImageElementBridge#createRasterImageNode should use some reasonable trimming of given url if possible. Not only to limit size of an Exception thrown, but also for some safety reasons as the image content probably should not be published in a Throwable's message.