Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 8247 invoked from network); 26 Apr 2010 17:55:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Apr 2010 17:55:55 -0000 Received: (qmail 33288 invoked by uid 500); 26 Apr 2010 17:55:55 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 33267 invoked by uid 500); 26 Apr 2010 17:55:55 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 33259 invoked by uid 99); 26 Apr 2010 17:55:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Apr 2010 17:55:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Apr 2010 17:55:53 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3QHtVVR011552 for ; Mon, 26 Apr 2010 17:55:31 GMT Message-ID: <30850546.13021272304531730.JavaMail.jira@thor> Date: Mon, 26 Apr 2010 13:55:31 -0400 (EDT) From: "Stan Lewis (JIRA)" To: issues@cxf.apache.org Subject: [jira] Created: (CXF-2785) Base64Utils.decode should handle/wrap all exception types. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Base64Utils.decode should handle/wrap all exception types. ---------------------------------------------------------- Key: CXF-2785 URL: https://issues.apache.org/jira/browse/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(Base64Utility.java:345) at org.apache.cxf.common.util.Base64Utility.decodeChunk(Base64Utility.java:164) at org.apache.cxf.common.util.Base64Utility.decode(Base64Utility.java:180) at org.apache.cxf.transport.http.AbstractHTTPDestination.setHeaders(AbstractHTTPDestination.java:147) at org.apache.cxf.transport.http.AbstractHTTPDestination.setupMessage(AbstractHTTPDestination.java:333) at org.apache.cxf.transport.http.AbstractHTTPDestination.setupMessage(AbstractHTTPDestination.java:270) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:302) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:276) at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70) ... 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.