Return correct DAV namespace for missing properties (closes #1545)

This commit is contained in:
mdecimus 2025-05-25 10:21:34 +02:00
parent 1efaedcc27
commit 18b620c50d
4 changed files with 18 additions and 1 deletions

View file

@ -59,7 +59,7 @@ Key features:
- **Spam** and **Phishing** built-in filter:
- Comprehensive set of filtering **rules** on par with popular solutions.
- LLM-driven spam filtering and message analysis.
- Statistical **spam classifier** with automatic training capabilities.
- Statistical **spam classifier** with automatic training capabilities and address book integration.
- DNS Blocklists (**DNSBLs**) checking of IP addresses, domains, and hashes.
- Collaborative digest-based spam filtering with **Pyzor**.
- **Phishing** protection against homographic URL attacks, sender spoofing and other techniques.

View file

@ -226,6 +226,18 @@ impl DavProperty {
None,
)
}
pub fn namespace(&self) -> Namespace {
match self {
DavProperty::WebDav(WebDavProperty::GetCTag) => Namespace::CalendarServer,
DavProperty::CardDav(_)
| DavProperty::Principal(PrincipalProperty::AddressbookHomeSet) => Namespace::CardDav,
DavProperty::CalDav(_) | DavProperty::Principal(PrincipalProperty::CalendarHomeSet) => {
Namespace::CalDav
}
_ => Namespace::Dav,
}
}
}
impl AsRef<str> for DavProperty {

View file

@ -298,6 +298,7 @@ impl PropFindRequestHandler for Server {
fields.push(DavPropertyValue::new(prop.clone(), reports));
}
_ => {
response.set_namespace(prop.namespace());
fields_not_found.push(DavPropertyValue::empty(prop.clone()));
}
}
@ -1330,6 +1331,7 @@ impl PropFindRequestHandler for Server {
_ => {
if !skip_not_found {
response.set_namespace(property.namespace());
fields_not_found.push(DavPropertyValue::empty(property.clone()));
}
}
@ -1337,6 +1339,7 @@ impl PropFindRequestHandler for Server {
property => {
if !skip_not_found {
response.set_namespace(property.namespace());
fields_not_found.push(DavPropertyValue::empty(property.clone()));
}
}

View file

@ -228,6 +228,7 @@ impl PrincipalPropFind for Server {
));
}
_ => {
response.set_namespace(property.namespace());
fields_not_found.push(DavPropertyValue::empty(property.clone()));
}
},
@ -275,6 +276,7 @@ impl PrincipalPropFind for Server {
}
},
_ => {
response.set_namespace(property.namespace());
fields_not_found.push(DavPropertyValue::empty(property.clone()));
}
}