commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19860] - base64 codec doesnt ignore all illegal chars
Date Wed, 14 May 2003 02:22:43 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19860>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19860

base64 codec doesnt ignore all illegal chars

tobrien@discursive.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From tobrien@discursive.com  2003-05-14 02:22 -------
I plead guilty.  discard whitespace *used* to discard all non-base64 characters
which brings the base64 implementation to full Base64 compliance - the problem
with that was that is made the function isArrayByteBase64() completely useless.
  Assume that discardWhitespace() removes all non-base64 characters, then it is
pointless to test the groomed byte array to see if it contains only valid base64
characters.  This was unconvered with the help of Clover - isArrayByteBase64
*never* returned false.

The compromise, which I'm about to commit is that we retain discardWhitespace
for use only from isArrayByteBase64() - If someone needs to test a byte array to
see if it contains base64 encoded data, we will throw away *all* (most?)
whitespace and then perform the test.  This leaves a possibility of
isArrayByteBase64 returning false if a byte array contains characters outside of
the base64 alphabet.

A new function discardNonBase64 discards all characters outside of the Base64
alphabet AND brings the implementation up to compliance.  Thank you for pointing
this out.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message