[Spambayes] [ spambayes-Bugs-696458 ] crash in tokenizer due to bad base64 in subject

SourceForge.net noreply at sourceforge.net
Mon Mar 3 02:12:50 EST 2003


Bugs item #696458, was opened at 2003-03-03 11:12
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=696458&group_id=61702

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Sjoerd Mullender (sjoerd)
Assigned to: Nobody/Anonymous (nobody)
Summary: crash in tokenizer due to bad base64 in subject

Initial Comment:
I got a crash in the tokenizer in the line where it does

        x = msg.get('subject', '')
        for x, subjcharset in
email.Header.decode_header(x):

The reason is, the subject of this particular message is

Subject: *****SPAM*****
=?EUC-KR?B?CSixpLDtKSC/7Liuvsax4iC6uLmwMcijIKHaILzSwd/H0SC8+LCjwLsgv7W/+Mj3IQ?=

which gives a binascii.Error: Incorrect padding from
binascii.a2b_base64.

I am running an up-to-date spambayes and python (i.e.
both fresh from CVS).

Here is a (parial) stack trace:

  File
"/ufs/sjoerd/src/spambayes/spambayes/tokenizer.py",
line 1052, in tokenize
    for tok in self.tokenize_headers(msg):
  File
"/ufs/sjoerd/src/spambayes/spambayes/tokenizer.py",
line 1106, in tokenize_headers
    for x, subjcharset in email.Header.decode_header(x):
  File
"/ufs/sjoerd/src/Python/dist/src/Lib/email/Header.py",
line 92, in decode_header
    dec = email.base64MIME.decode(encoded)
  File
"/ufs/sjoerd/src/Python/dist/src/Lib/email/base64MIME.py",
line 179, in decode
    dec = a2b_base64(s)
binascii.Error: Incorrect padding


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=696458&group_id=61702



More information about the Spambayes mailing list