From eb628704c0f3090f1cc95c6ad26c6f437652ef79 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 3 Apr 2023 11:14:34 +0200 Subject: [PATCH] minidom: Bump rxml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was causing a memory corruption on closing tags for elements with a name longer than 24 bytes. I haven’t investigated why smartstring < 1 had this bug, but it got fixed in 1.0.0 so let’s use that. --- minidom/Cargo.toml | 2 +- minidom/src/tests.rs | 12 ++++++++++++ tokio-xmpp/Cargo.toml | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/minidom/Cargo.toml b/minidom/Cargo.toml index b61523b..5b74baa 100644 --- a/minidom/Cargo.toml +++ b/minidom/Cargo.toml @@ -21,4 +21,4 @@ edition = "2018" gitlab = { repository = "xmpp-rs/xmpp-rs" } [dependencies] -rxml = "^0.8.0" +rxml = "0.9.1" diff --git a/minidom/src/tests.rs b/minidom/src/tests.rs index d209c0b..160fdd3 100644 --- a/minidom/src/tests.rs +++ b/minidom/src/tests.rs @@ -452,3 +452,15 @@ fn missing_namespace_error() { err => panic!("No or wrong error: {:?}", err), } } + +#[test] +fn misserialisation() { + let xml = + "vp9"; + //let elem = xml.parse::().unwrap(); + let elem = Element::builder("jitsi_participant_codecType", "jabber:client") + .append("vp9") + .build(); + let data = String::from(&elem); + assert_eq!(xml, data); +} diff --git a/tokio-xmpp/Cargo.toml b/tokio-xmpp/Cargo.toml index 2f9b06f..06eaedd 100644 --- a/tokio-xmpp/Cargo.toml +++ b/tokio-xmpp/Cargo.toml @@ -27,7 +27,7 @@ trust-dns-proto = "0.22" trust-dns-resolver = "0.22" xmpp-parsers = "0.19" minidom = "0.15" -rxml = "^0.8.0" +rxml = "0.9.1" webpki-roots = { version = "0.22", optional = true } rand = "^0.8"