-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
restore lenient libmagic decoding #1375
Conversation
b06210a
to
dae40ed
Compare
I just backported the change to version 0.8 that we are about to upload to Debian and my results are:
|
Thanks for this josh and mjg! @lucc: what do you think? |
The force-pushed change shows that with this commit, the What I don't know is whether the behavour change introduced in commit #176cffc was intentional, based on a concrete example, or just on the rationale "if there are decode errors then ignore undecodable bytes", which seems reasonable. I'm wondering: Is the message from the test case RFC compliant? It certainly is in a very common format. It is exactly this type that |
Libmagic actually does some sort of analysis to figure out what the content encoding is, the FWIW, I think this is the right thing to do; try to trust the payload, if it lied/is wrong then fall back to libmagic. Or, bump the version to 3.6 which IIRC can actually do this correctly. Since this is blocking debian's adoption of 0.8, I think there should be a 0.8.1 release. |
@dcbaker: by "bump the version" you mean have alot eepend on python \ge 3.6 ? |
@pazz sorry I'm late. I also vote for 0.8.1 |
OK, I've just tagged this bugfix release (but won't announce it on the notmuch list) |
@pazz: I think maybe you didn't change |
@jljusten: thanks and sorry: I only pushed the tags, not the last commit. It should be fixed now. |
176cffc ("refactor alot.db.utils.remove_cte", 2018-12-04) created a few
problems with 8bit quoted-printable e-mails, see #1291 #1360.
This commit restores the old libmagic fallback which did not cause this
problem.
(Maybe just goood as a 0.8 hotfix.)