mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-11 01:02:01 +03:00
Fix unbounded request vector in fetch_historical_rates_batch
Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
This commit is contained in:
parent
bede889ced
commit
71711e6f54
1 changed files with 3 additions and 0 deletions
|
|
@ -599,6 +599,9 @@ async fn fetch_historical_rates_batch(
|
||||||
app: AppHandle,
|
app: AppHandle,
|
||||||
dates: Vec<String>,
|
dates: Vec<String>,
|
||||||
) -> Result<std::collections::HashMap<String, std::collections::HashMap<String, f64>>, String> {
|
) -> Result<std::collections::HashMap<String, std::collections::HashMap<String, f64>>, String> {
|
||||||
|
if dates.len() > 100 {
|
||||||
|
return Err("too many dates requested".to_string());
|
||||||
|
}
|
||||||
let mut results = std::collections::HashMap::new();
|
let mut results = std::collections::HashMap::new();
|
||||||
let mut missing_dates = Vec::new();
|
let mut missing_dates = Vec::new();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue