gh-150599: Prevent bz2 decompressor reuse after errors#150600
gh-150599: Prevent bz2 decompressor reuse after errors#150600StanFromIreland wants to merge 2 commits into
Conversation
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Why reraise the same error again and again? Why not close the decomressor, set eof and raise EOFError? Or set other flag and raise ValueError or RuntimeError?
|
Serhiy, FYI this is the fix for: https://github.com/python/cpython/security/advisories/GHSA-mv83-7xc2-cc7v
Setting |
|
You are not supposed to use decompressor after failure. Raising a ValueError or a RuntimeError with specific error message ("decompressor is dead, don't use it") will make it clear. |
It is clear, I'm still leaning towards providing the root cause being more helpful. Greg and Emma, what do you think is better here? |
|
You already got the initial error first time. There is no precedence of keeping the original error and raising it on recurring requests. |
Uh oh!
There was an error while loading. Please reload this page.