Fix JMAP: Principal/query returns broad results when a name or email filter cannot be resolved
This commit is contained in:
@@ -13,6 +13,7 @@ If you are upgrading from v0.16.x, replace the binary (or run `docker pull`). If
|
|||||||
## Fixed
|
## Fixed
|
||||||
- DANE: Verify DNSSEC is supported by the resolver before attempting to validate TLSA records.
|
- DANE: Verify DNSSEC is supported by the resolver before attempting to validate TLSA records.
|
||||||
- TLS: Update search index when file-backed certificates are refreshed.
|
- TLS: Update search index when file-backed certificates are refreshed.
|
||||||
|
- JMAP: `Principal/query` returns broad results when a `name` or `email` filter cannot be resolved.
|
||||||
|
|
||||||
## [0.16.10] - 2026-06-21
|
## [0.16.10] - 2026-06-21
|
||||||
|
|
||||||
|
|||||||
@@ -62,11 +62,14 @@ impl PrincipalQuery for Server {
|
|||||||
match cond {
|
match cond {
|
||||||
Filter::Property(cond) => match cond {
|
Filter::Property(cond) => match cond {
|
||||||
PrincipalFilter::Name(name) | PrincipalFilter::Email(name) => {
|
PrincipalFilter::Name(name) | PrincipalFilter::Email(name) => {
|
||||||
if let Some(account_id) = self.account_id_from_email(&name, false).await? {
|
filters.push(SearchFilter::is_in_set(
|
||||||
filters.push(SearchFilter::is_in_set(
|
match self.account_id_from_email(&name, false).await? {
|
||||||
RoaringBitmap::from_sorted_iter([account_id]).unwrap(),
|
Some(account_id) => {
|
||||||
));
|
RoaringBitmap::from_sorted_iter([account_id]).unwrap()
|
||||||
}
|
}
|
||||||
|
None => RoaringBitmap::new(),
|
||||||
|
},
|
||||||
|
));
|
||||||
}
|
}
|
||||||
PrincipalFilter::AccountIds(ids) => {
|
PrincipalFilter::AccountIds(ids) => {
|
||||||
filters.push(SearchFilter::is_in_set(
|
filters.push(SearchFilter::is_in_set(
|
||||||
|
|||||||
Reference in New Issue
Block a user