Bump dependencies

This commit is contained in:
mdecimus
2025-08-19 09:06:18 +01:00
parent cae49be574
commit 062863eb4c
30 changed files with 947 additions and 821 deletions

View File

@@ -49,7 +49,7 @@ sieve-rs = { version = "0.7", features = ["rkyv"] }
utils = { path = "../crates/utils", features = ["test_mode"] }
jmap-client = { version = "0.3", features = ["websockets", "debug", "async"] }
mail-parser = { version = "0.11", features = ["full_encoding", "rkyv"] }
tokio = { version = "1.45", features = ["full"] }
tokio = { version = "1.47", features = ["full"] }
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12"] }
rustls = { version = "0.23.5", default-features = false, features = ["std", "ring", "tls12"] }
rustls-pemfile = "2.0"
@@ -77,7 +77,7 @@ biscuit = "0.7.0"
form_urlencoded = "1.1.0"
rkyv = { version = "0.8.10", features = ["little_endian"] }
compact_str = "0.9.0"
quick-xml = "0.37.2"
quick-xml = "0.38"
[target.'cfg(not(target_env = "msvc"))'.dependencies]

View File

@@ -37,7 +37,7 @@ use quick_xml::Reader;
use quick_xml::events::Event;
use services::SpawnServices;
use smtp::{SpawnQueueManager, core::SmtpSessionManager};
use std::str;
use std::{borrow::Cow, str};
use std::{
sync::Arc,
time::{Duration, Instant},
@@ -758,10 +758,38 @@ fn flatten_xml(xml: &str) -> Vec<(String, String)> {
}
}
Event::Text(e) => {
let text = e.unescape().unwrap();
let text = e.xml_content().unwrap();
let trimmed = text.trim();
if !trimmed.is_empty() {
text_content = Some(trimmed.to_string());
if let Some(text_content) = text_content.as_mut() {
text_content.push_str(trimmed);
} else {
text_content = Some(trimmed.to_string());
}
}
}
Event::GeneralRef(entity) => {
let value: Cow<str> = match entity.as_ref() {
b"lt" => "<".into(),
b"gt" => ">".into(),
b"amp" => "&".into(),
b"apos" => "'".into(),
b"quot" => "\"".into(),
_ => {
if let Ok(Some(gr)) = entity.resolve_char_ref() {
gr.to_string().into()
} else {
std::str::from_utf8(entity.as_ref())
.unwrap_or_default()
.into()
}
}
};
if let Some(text_content) = text_content.as_mut() {
text_content.push_str(value.as_ref());
} else {
text_content = Some(value.into_owned());
}
}
Event::CData(e) => {