mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-10-30 06:16:06 +08:00
Return correct DAV namespace for missing properties (closes #1545)
This commit is contained in:
parent
1efaedcc27
commit
18b620c50d
4 changed files with 18 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue