rust-plist
rust-plist copied to clipboard
after update : Bad plist are now parsed with no error
hello,
just updated plist package and some errors are missing :
cargo update -p plist
Updating crates.io index
Locking 2 packages to latest compatible versions
Removing base64 v0.21.7
Removing line-wrap v0.1.1
Updating plist v1.6.0 -> v1.7.0
Updating quick-xml v0.31.0 -> v0.32.0 (latest: v0.37.1)
Removing safemem v0.3.3
Then this test is now passing (should not) :
#[test]
fn should_fail_on_read_bad_plist_content() -> anyhow::Result<()> {
let bad_plist = b"not a plist";
let reader = std::io::Cursor::new(bad_plist);
let plist_value: plist::Value = plist::from_reader(reader)?;
assert_eq!(format!("{plist_value:?}"), "String(\"not\")");
Ok(())
}
Perhaps because of quick-xml ?
I assume this is due to the newly introduced support for reading ASCII plists.
@steven-joruk Do you know if plain test is a valid ASCII plist? It doesn't look like it from a quick googling.
I think a plist containing just one word with no whitespace e.g. valid-plist should parse, but not a valid plist should emit Ok(Event::String("not")) followed by Err(...) as the input contains unparsed data.
Fix released in v1.7.3.