cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stan Lewis (JIRA)" <>
Subject [jira] Created: (CXF-2785) Base64Utils.decode should handle/wrap all exception types.
Date Mon, 26 Apr 2010 17:55:31 GMT
Base64Utils.decode should handle/wrap all exception types.

                 Key: CXF-2785
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.2.6
            Reporter: Stan Lewis
         Attachments: patch.txt

Currently if you pass an invalid base64 encoded string to Base64Utils.decode() you can get
various kinds of errors, as the code only catches at most IOException and converts that to
a Base64Exception.  Should really catch Exception and log it appropriately to avoid seeing
errors at runtime like this:

java.lang.ArrayIndexOutOfBoundsException: 8
        at org.apache.cxf.common.util.Base64Utility.processEncodeme(
        at org.apache.cxf.common.util.Base64Utility.decodeChunk(
        at org.apache.cxf.common.util.Base64Utility.decode(
        at org.apache.cxf.transport.http.AbstractHTTPDestination.setHeaders(
        at org.apache.cxf.transport.http.AbstractHTTPDestination.setupMessage(
        at org.apache.cxf.transport.http.AbstractHTTPDestination.setupMessage(
        at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(
        at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(
        at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(

The attached patch does this.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message