mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-09-02 01:29:23 +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
@@ -330,7 +330,13 @@ pub fn add_sheet(spreadsheet_id: &str, title: &str) -> Result<AddSheetResult, St
|
||||
|
||||
let parsed = batch_update(spreadsheet_id, requests)?;
|
||||
|
||||
let reply = &parsed["replies"][0]["addSheet"]["properties"];
|
||||
let reply = parsed["replies"]
|
||||
.as_array()
|
||||
.and_then(|arr| arr.first())
|
||||
.map(|r| &r["addSheet"]["properties"]);
|
||||
|
||||
let reply = reply.ok_or("No reply from batch update")?;
|
||||
|
||||
Ok(AddSheetResult {
|
||||
sheet: SheetInfo {
|
||||
sheet_id: reply["sheetId"].as_i64().unwrap_or(0),
|
||||
|
||||
Reference in New Issue
Block a user