Strict vCard parsing (#1607)

This commit is contained in:
mdecimus 2025-06-01 17:55:20 +02:00
parent b3fd99673e
commit 774e80ab32
7 changed files with 9 additions and 9 deletions

4
Cargo.lock generated
View file

@ -989,9 +989,9 @@ dependencies = [
[[package]]
name = "calcard"
version = "0.1.1"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e16f081c4da49b29187103679784b4dcf2fbda52e9b519388c397cb58414e5a"
checksum = "c6387223a016027ad73f3482d6e58f804d22edcc8bff1a31df877094850621a6"
dependencies = [
"ahash",
"chrono",

View file

@ -19,7 +19,7 @@ mail-auth = { version = "0.7" }
mail-send = { version = "0.5", default-features = false, features = ["cram-md5", "ring", "tls12"] }
smtp-proto = { version = "0.1", features = ["rkyv"] }
dns-update = { version = "0.1" }
calcard = { version = "0.1.1", features = ["rkyv"] }
calcard = { version = "0.1.2", features = ["rkyv"] }
ahash = { version = "0.8.2", features = ["serde"] }
parking_lot = "0.12.1"
regex = "1.7.0"

View file

@ -7,7 +7,7 @@ edition = "2021"
trc = { path = "../trc" }
hashify = "0.2.6"
quick-xml = "0.37.2"
calcard = { version = "0.1.1", features = ["rkyv"] }
calcard = { version = "0.1.2", features = ["rkyv"] }
mail-parser = { version = "0.11", features = ["full_encoding", "rkyv"] }
hyper = "1.6.0"
rkyv = { version = "0.8.10", features = ["little_endian"] }
@ -15,7 +15,7 @@ chrono = { version = "0.4.40", features = ["serde"], optional = true }
compact_str = "0.9.0"
[dev-dependencies]
calcard = { version = "0.1.1", features = ["serde", "rkyv"] }
calcard = { version = "0.1.2", features = ["serde", "rkyv"] }
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.138"
chrono = { version = "0.4.40", features = ["serde"] }

View file

@ -14,7 +14,7 @@ directory = { path = "../directory" }
http_proto = { path = "../http-proto" }
jmap_proto = { path = "../jmap-proto" }
trc = { path = "../trc" }
calcard = { version = "0.1.1", features = ["rkyv"] }
calcard = { version = "0.1.2", features = ["rkyv"] }
hashify = { version = "0.2" }
hyper = { version = "1.0.1", features = ["server", "http1", "http2"] }
percent-encoding = "2.3.1"

View file

@ -77,7 +77,7 @@ impl CardUpdateRequestHandler for Server {
))
})?;
let vcard = match Parser::new(vcard_raw).entry() {
let vcard = match Parser::new(vcard_raw).strict().entry() {
Entry::VCard(vcard) => vcard,
_ => {
return Err(DavError::Condition(DavErrorCondition::new(

View file

@ -12,7 +12,7 @@ jmap_proto = { path = "../jmap-proto" }
trc = { path = "../trc" }
directory = { path = "../directory" }
dav-proto = { path = "../dav-proto" }
calcard = { version = "0.1.1", features = ["rkyv"] }
calcard = { version = "0.1.2", features = ["rkyv"] }
hashify = "0.2"
tokio = { version = "1.45", features = ["net", "macros"] }
rkyv = { version = "0.8.10", features = ["little_endian"] }

View file

@ -29,7 +29,7 @@ imap = { path = "../crates/imap", features = ["test_mode"] }
imap_proto = { path = "../crates/imap-proto" }
dav = { path = "../crates/dav", features = ["test_mode"] }
dav-proto = { path = "../crates/dav-proto", features = ["test_mode"] }
calcard = { version = "0.1.1", features = ["rkyv"] }
calcard = { version = "0.1.2", features = ["rkyv"] }
groupware = { path = "../crates/groupware", features = ["test_mode"] }
http = { path = "../crates/http", features = ["test_mode", "enterprise"] }
http_proto = { path = "../crates/http-proto" }