bpo-42051: Reject XML entity declarations in plist files#22760
bpo-42051: Reject XML entity declarations in plist files#22760ronaldoussoren merged 1 commit intopython:masterfrom
Conversation
tiran
left a comment
There was a problem hiding this comment.
Thanks, that's a simple and great solution for the issue. LGTM
|
@ronaldoussoren: Please replace |
|
Thanks @ronaldoussoren for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
) (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 🌮🎉.. I'm working now to backport this PR to: 3.6. |
|
Thanks @ronaldoussoren for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
|
Sorry, @ronaldoussoren, I could not cleanly backport this to |
|
Sorry @ronaldoussoren, I had trouble checking out the |
|
Thanks @ronaldoussoren for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
|
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>
… (GC-22801) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Ned Deily <nad@python.org>
bpo-42051: Reject XML entity declarations in plist files (python#22760) (GC-22801)
… (GC-22801) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Ned Deily <nad@python.org>
… (GC-22801) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Ned Deily <nad@python.org> Add InvalidFileException class. RaisesRegex is RaisesRegexp in python2. plistlib.loads is in the python3 version of plistlib, but there are too many changes to backport this simply.
… (GC-22801) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Ned Deily <nad@python.org> Add InvalidFileException class. RaisesRegex is RaisesRegexp in python2. plistlib.loads is in the python3 version of plistlib, but there are too many changes to backport this simply.
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