[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

Joaquin Cuenca Abela report at bugs.python.org
Sun Mar 7 19:04:03 CET 2010


Joaquin Cuenca Abela <e98cuenc at gmail.com> added the comment:

Unfortunately the only way that I can see to reliably work around this is to bypass entirely get_payload, in this case fixing this bug will not affect people that do that negatively.

Some people may have more control over their attachments and they are unconditionally adding a \n to certain type of attachments. In this case they will get an extra \n after this patch.

If they are doing this, they certainly realized there was a bug, because this is only necessary for base64 encoded attachments and not for any other encoding. In this case I guess it's reasonable to expect that this bug will be fixed one day.

But you're right that the change is risky, an that we (at least I) are not sure why the code is the way it is.

Cheers,

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7143>
_______________________________________


More information about the Python-bugs-list mailing list