diff --git a/Cargo.lock b/Cargo.lock index d5cf68a5..4b6b4e52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -974,9 +974,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.25" +version = "0.14.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" +checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" dependencies = [ "bytes", "futures-channel", @@ -2119,9 +2119,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.23.1" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea" +checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" dependencies = [ "memchr", "serde", diff --git a/core/Cargo.toml b/core/Cargo.toml index 446f23e3..d081d4ef 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -41,7 +41,7 @@ parking_lot = { version = "0.12", features = ["deadlock_detection"] } pbkdf2 = { version = "0.12", default-features = false, features = ["hmac"] } priority-queue = "1.2" protobuf = "3" -quick-xml = { version = "0.23", features = ["serialize"] } +quick-xml = { version = "0.28", features = ["serialize"] } rand = "0.8" rsa = "0.8.2" serde = { version = "1.0", features = ["derive"] } diff --git a/core/src/session.rs b/core/src/session.rs index 1936467e..de467a55 100644 --- a/core/src/session.rs +++ b/core/src/session.rs @@ -309,19 +309,17 @@ impl Session { let mut user_attributes: UserAttributes = HashMap::new(); loop { - match reader.read_event(&mut buf) { + match reader.read_event_into(&mut buf) { Ok(Event::Start(ref element)) => { - current_element = std::str::from_utf8(element.name())?.to_owned() + current_element = std::str::from_utf8(element)?.to_owned() } Ok(Event::End(_)) => { current_element = String::new(); } Ok(Event::Text(ref value)) => { if !current_element.is_empty() { - let _ = user_attributes.insert( - current_element.clone(), - value.unescape_and_decode(&reader)?, - ); + let _ = user_attributes + .insert(current_element.clone(), value.unescape()?.to_string()); } } Ok(Event::Eof) => break,