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
bpo-42051: Reject XML entity declarations in plist files #22760
Conversation
Thanks, that's a simple and great solution for the issue. LGTM
@ronaldoussoren: Please replace |
Thanks @ronaldoussoren for the PR |
) (cherry picked from commit 05ee790) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
GH-22771 is a backport of this pull request to the 3.9 branch. |
) (cherry picked from commit 05ee790) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
GH-22772 is a backport of this pull request to the 3.8 branch. |
Thanks @ronaldoussoren for the PR |
Thanks @ronaldoussoren for the PR |
Sorry, @ronaldoussoren, I could not cleanly backport this to |
Sorry @ronaldoussoren, I had trouble checking out the |
Thanks @ronaldoussoren for the PR |
Sorry, @ronaldoussoren, I could not cleanly backport this to |
I'm looking at the conflicts. |
GH-22801 is a backport of this pull request to the 3.7 branch. |
) (pythonGH-22801) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> (cherry picked from commit e512bc7) Co-authored-by: Ned Deily <nad@python.org>
) (pythonGH-22801) (pythonGH-22804) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> (cherry picked from commit e512bc7) Co-authored-by: Ned Deily <nad@python.org> Rebased for Python 2.7 by Michał Górny <mgorny@gentoo.org>
plistlib uses ElementTree to parse XML files, and therefore is subject to a number of XML vulnerabilities. Those can be avoided by rejecting entity declarations in XML plist files.
Doing this is safe because Apple tools like plutil(1) also reject XML files with entity declarations.
https://bugs.python.org/issue42051