Message1286

Author akuchling
Recipients
Date 2006-11-20.18:46:38
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
I submitted a patch that fixes problems with the SHA
module.

One problem was the use of java.lang.String.getBytes() without
specifying some encoding; this resulted in bad results where the first
character of a hash value was >256.  Presumably the encoding on my Mac
is UTF-8.  The fix is to do getBytes("ISO-8859-1"); this in turn
requires catching an UnsupportedEncodingException.

Other portions of code that just call .getBytes() may also need changing,
wherever strings are being treated as containing 8-bit characters.

Possible files that need fixing: FilelikeInputStream.java,
parser.java, Py.java, PyArray, PyFile, binascii.java, and of course
PyString.  zlib.py's adler32() function also uses getBytes and I think
it needs to be fixed, too.
History
Date User Action Args
2008-02-20 17:17:35adminlinkissue1599900 messages
2008-02-20 17:17:35admincreate