[issue40381] plistlib doesn't handle poorly-formatted plists

2020-04-28 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40381] plistlib doesn't handle poorly-formatted plists

2020-04-27 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

IMHO this is a bug and plistlib should behave the same as Apple’s libraries 
here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40381] plistlib doesn't handle poorly-formatted plists

2020-04-24 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40381] plistlib doesn't handle poorly-formatted plists

2020-04-24 Thread Clay Caviness

Clay Caviness  added the comment:

I expect the answer here to be "plistlib is correct, that's a poorly formatted 
plist", but since plistlib is "for reading and writing the “property list” 
files used mainly by Mac OS X and supports both binary and XML plist files", 
and Apple's own tooling handles these poorly-formatted files without error it 
was worth raising the issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40381] plistlib doesn't handle poorly-formatted plists

2020-04-24 Thread Clay Caviness


New submission from Clay Caviness :

Some Info.plist files are poorly formatted. I am using plistlib to read 
Info.plist file from various .app bundles. On some, plistlib.load raises a 
ValueError when trying to parse.

Examining one of these Info.plist files, it turns out *it* is poorly formatted, 
but while python's plistlib is unhappy, it passes "plutil -lint" just fine and 
"Foundation.NSDictionary.dictionaryWithContentsOfFile_" is happy to read it.

Here's a minimal sample plist file:
"""

http://www.apple.com/DTDs/PropertyList-1.0.dtd;>


  An array
  
a string
A wild key appears!
it has a string
another string
  


"""

plistlib (correctly, I think) says that's no good. Apple's tooling just ... 
changes the key to another string in the array and carries on.

I've attached an actual problematic Info.plist as well.

--
components: Library (Lib)
files: Info.plist
messages: 367217
nosy: Clay Caviness
priority: normal
severity: normal
status: open
title: plistlib doesn't handle poorly-formatted plists
versions: Python 3.7
Added file: https://bugs.python.org/file49091/Info.plist

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com