On Wed, Mar 1, 2017 at 5:35 PM, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> wrote:
Hi Magnus,
Thanks for the quick fix for the email From header bug yesterday. I haven't had a chance to test it yet, because I don't want to pollute the mailing list with test messages.
Apologies for a late response - it's been conference weeks.. THanks, however, for your efforts!
Please find attached two more patches:
#1 applies the same fix when Cc-ing patch authors
Oops. I thought I looked for that but missed it.
I think this calls for putting it in the UserWrapper() class instead, so I did that instead of using your patch, but have pushed a fix with it.
#2 MIME-decodes headers received from the mailing list archive JSON API
I haven't been able to talk to the JSON api, so I couldn't test them properly, but I did some stand-alone testing of the code snippets.
Note that the MIME decoding only works properly if running under Python 3; the Python 2 version of email.header.decode_header() has broken detection of the end of encoded-words.
Is the patch still an improvement on python2?
It'll take a bit more than that to just enable python3, as the environment the django app runs in is not python3 and we've got a standardized one across all the smaller webapps. We do need to update it to python3, but that task hasn't been done yet.
Also, based on your other email about the list archives -- if we fix this in the archives, does that make this patch unnecessary?