mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-09-01 00:59:33 +00:00
fix: address critical/high audit findings across WASM sub-crates
- Telegram: remove .unwrap() panic on workspace_read (owner_id check) - WhatsApp: use configured api_version instead of hardcoded v18.0 - WhatsApp: log config parse errors before falling back to defaults - Slack: log serialization errors in emit_message and json_response - Google Docs: safe array access for batch update replies - Google Sheets: safe array access for add_sheet replies - Google Calendar: fix doc comment secret name mismatch - Gmail: avoid unnecessary String allocation in UNREAD check Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
e982699e09
commit
a0e01f04d3
@@ -269,8 +269,13 @@ pub fn replace_text(
|
||||
|
||||
let parsed = batch_update_raw(document_id, vec![request])?;
|
||||
|
||||
let occurrences = parsed["replies"][0]["replaceAllText"]["occurrencesChanged"]
|
||||
.as_i64()
|
||||
let first_reply = parsed["replies"].as_array().and_then(|arr| arr.first());
|
||||
let occurrences = first_reply
|
||||
.map(|r| {
|
||||
r["replaceAllText"]["occurrencesChanged"]
|
||||
.as_i64()
|
||||
.unwrap_or(0)
|
||||
})
|
||||
.unwrap_or(0);
|
||||
|
||||
Ok(ReplaceResult {
|
||||
|
||||
Reference in New Issue
Block a user