GeezerVison is showing github.com — gh-126033: Fix crash in _elementtree.c where evil tags/elements occurs · Pull Request #126079 · python/cpython
Conversation
gh-126033: Fix crash in _elementtree.c where evil tags/elements occurs
Throws errors when evil tags/elements was detected.
This also fixes gh-126037.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ghost
commented
Oct 28, 2024
•
edited by ghost
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
All commit authors signed the Contributor License Agreement. 
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.
If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The way to fix this is not necessarily only by checking whether extra is NULL or not. You may also change the size of the list without clearing it and currently we don't check this. I think we should use RuntimeError instead as well because that's the kind of exceptions we usually raise when a list is mutated while iterating over it.
There are also other places where there is a crash (namely in other find* methods). I would appreciate we first discuss the approach for fixing it (one way to fix it is to add versioning but we need to discuss first).
Finally, I would have appreciated if you first asked whether you could open a PR or not since I was also working on it (and self-assigned the issue).
|
sobolevn reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The way to fix this is not necessarily only by checking whether extra is NULL or not. You may also change the size of the list without clearing it and currently we don't check this. I think we should use RuntimeError instead as well because that's the kind of exceptions we usually raise when a list is mutated while iterating over it.
There are also other places where there is a crash (namely in other find* methods). I would appreciate we first discuss the approach for fixing it (one way to fix it is to add versioning but we need to discuss first).
Finally, I would have appreciated if you first asked whether you could open a PR or not since I was also working on it (and self-assigned the issue).
Sorry about that, I didn’t saw the issue carefully about the self-assigning tag. I’ve understand your solution about this issue, For my solution, just adding the error throwing for just few functions, doesn't really fit for this issue. so I’ll close this PR soon.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This pull request was closed.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.