fix: resolve bugs introduced during high severity vulnerability remediation

This commit is contained in:
NimBold
2026-06-24 23:59:38 +03:30
parent 00e84d6935
commit 187d70f348
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -337,7 +337,7 @@ fn claim_request(signature: &str, timestamp: u64, replay_cache: &ReplayCache) ->
};
cache.retain(|_, seen_at| now.saturating_sub(*seen_at) < SIGNATURE_MAX_AGE_MS);
if cache.len() > 10_000 {
cache.clear();
return false;
}
let key = format!("{timestamp}:{}", signature.to_ascii_lowercase());
cache.insert(key, now).is_none()