-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
TypeError: '<' not supported between instances of 'NoneType' and 'int'
raised during call to email.message_from_file
#134151
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
Comments
@bitdancer If possilbe, could you also have a look at:
TiA. |
This issue is in the old code, not the new API. If someone feels like fixing it I'll review, but I'm not going to fix this one myself. I'll look at the other issues presently, which are in the new API. |
Hello everyone, I am surprised to discover that this is a legend code craft from 17 years ago. I am uncertain of the extent to which it could be beneficial to fix it, as we have already received a new API. However, I would appreciate it if you could take a look at it, @bitdancer. Please let me know if you believe it is appropriate to merge this into the main branch :), thanks! |
… RFC 2231 continuations (#134687) - Fix sorting logic in `email.utils.decode_params` to handle None values. - Update tests for RFC 2231 continuation sorting.
…orting RFC 2231 continuations (pythonGH-134687) - Fix sorting logic in `email.utils.decode_params` to handle None values. - Update tests for RFC 2231 continuation sorting. (cherry picked from commit bcb6b45) Co-authored-by: Jiucheng(Oliver) <git.jiucheng@gmail.com>
…orting RFC 2231 continuations (pythonGH-134687) - Fix sorting logic in `email.utils.decode_params` to handle None values. - Update tests for RFC 2231 continuation sorting. (cherry picked from commit bcb6b45) Co-authored-by: Jiucheng(Oliver) <git.jiucheng@gmail.com>
…sorting RFC 2231 continuations (GH-134687) (#135248) gh-134151 Fix `TypeError` in `email.utils.decode_params` when sorting RFC 2231 continuations (GH-134687) - Fix sorting logic in `email.utils.decode_params` to handle None values. - Update tests for RFC 2231 continuation sorting. (cherry picked from commit bcb6b45) Co-authored-by: Jiucheng(Oliver) <git.jiucheng@gmail.com>
…sorting RFC 2231 continuations (GH-134687) (#135247) gh-134151 Fix `TypeError` in `email.utils.decode_params` when sorting RFC 2231 continuations (GH-134687) - Fix sorting logic in `email.utils.decode_params` to handle None values. - Update tests for RFC 2231 continuation sorting. (cherry picked from commit bcb6b45) Co-authored-by: Jiucheng(Oliver) <git.jiucheng@gmail.com>
Thanks @zangjiucheng for the fix, and @picnixz for the additional review and merge. |
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
During fuzzing of Python standard libraries, the following code snippet causes a TypeError with the following message:
TypeError: '<' not supported between instances of 'NoneType' and 'int'
. This occurs in thedecode_params
function at line 419 inemail/utils.py
.POC File:
https://github.com/FuturesLab/POC/blob/main/py-email/poc-02
Exception Trace
CPython versions tested on:
3.12, 3.11, 3.10, 3.9
Operating systems tested on:
Linux
Linked PRs
TypeError
inemail.utils.decode_params
when sorting RFC 2231 continuations (GH-134687) #135247TypeError
inemail.utils.decode_params
when sorting RFC 2231 continuations (GH-134687) #135248The text was updated successfully, but these errors were encountered: