* 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.
Plistlib currently throws an exception when asked to decode a valid
.plist file that was generated by Apple's NSKeyedArchiver. Specifically,
this is caused by a byte 0x80 (signifying a UID) not being understood.
This fixes the problem by enabling the binary plist reader and writer
to read and write plistlib.UID objects.
2019-05-15 23:14:38 +03:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)
* Fixed saving bytearrays.
* Identical objects will be saved only once.
* Equal references will be load as identical objects.
* Added support for saving and loading recursive data structures.
Values in the range of an unsigned long long, but outside of the range
of a signed long long were serialized as a negative value.
Due to a bug in PyObjC my test scripts indicated that the previous behavior
matched Apple's plist code, instead the handle large unsigned values correctly.
The change to plistlib.py is from a patch by Serhiy.
* Negative integer support in binary plists was broken
* Better exception for invalid data
* Fix the versionadded/versionchanged markup in the documentation
* Add the interface cleanup to what's new for 3.4
This patch adds support for binary plists on OSX to plistlib (based
on a patch by 'dpounces').
The patch also cleans up the API for the plistlib module.