Commit a63234c
authored
[3.6] bpo-42103: Improve validation of Plist files. (pythonGH-22882) (pythonGH-23118)
* Prevent some possible DoS attacks via providing invalid Plist files
with extremely large number of objects or collection sizes.
* Raise InvalidFileException for too large bytes and string size instead of returning garbage.
* Raise InvalidFileException instead of ValueError for specific invalid datetime (NaN).
* Raise InvalidFileException instead of TypeError for non-hashable dict keys.
* Add more tests for invalid Plist files..
(cherry picked from commit 34637a0)
Co-authored-by: Serhiy Storchaka <[email protected]>1 parent a75c4c9 commit a63234c
File tree
4 files changed
+367
-67
lines changed- Lib
- test
- Misc/NEWS.d/next
- Library
- Security
4 files changed
+367
-67
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | | - | |
| 636 | + | |
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
652 | | - | |
| 652 | + | |
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
715 | 716 | | |
716 | 717 | | |
717 | 718 | | |
718 | | - | |
719 | | - | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
720 | 723 | | |
721 | 724 | | |
722 | | - | |
723 | | - | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
724 | 730 | | |
725 | 731 | | |
726 | 732 | | |
| |||
744 | 750 | | |
745 | 751 | | |
746 | 752 | | |
747 | | - | |
748 | | - | |
749 | | - | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
750 | 758 | | |
751 | 759 | | |
752 | 760 | | |
| |||
0 commit comments