This commit is contained in:
mdecimus
2025-10-22 18:02:46 +02:00
parent 49b384d740
commit 86c963ef68
27 changed files with 528 additions and 395 deletions

View File

@@ -231,7 +231,7 @@ impl Server {
.data
.into_iter()
.filter_map(|v| {
if let PrincipalData::Secret(secret) = v {
if let PrincipalData::Password(secret) = v {
Some(secret)
} else {
None

View File

@@ -344,10 +344,10 @@ impl JmapConfig {
}),
contact_parse_max_items: config
.property("jmap.contact.parse.max-items")
.unwrap_or(100),
.unwrap_or(10),
calendar_parse_max_items: config
.property("jmap.calendar.parse.max-items")
.unwrap_or(100),
.unwrap_or(10),
default_folders,
shared_folder,
};

View File

@@ -4,12 +4,12 @@
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
*/
use super::*;
use crate::expr::{if_block::IfBlock, tokenizer::TokenMap};
use ahash::AHashSet;
use std::time::Duration;
use std::{hash::Hasher, time::Duration};
use utils::config::{Config, Rate, utils::ParseValue};
use super::*;
use xxhash_rust::xxh3::Xxh3Builder;
#[derive(Clone)]
pub struct Network {
@@ -377,8 +377,9 @@ impl ClusterRole {
shard_id,
total_shards,
} => {
(ahash::RandomState::new().hash_one(item) % (*total_shards as u64))
== (*shard_id as u64)
let mut hasher = Xxh3Builder::new().with_seed(191179).build();
item.hash(&mut hasher);
hasher.finish() % (*total_shards as u64) == *shard_id as u64
}
}
}