Skip to content

fix: recurring timezone fallback, attachment hardening, transport defaults#228

Closed
salmonumbrella wants to merge 5 commits intoopenclaw:mainfrom
salmonumbrella:fix/issue-216-recurring-timezone
Closed

fix: recurring timezone fallback, attachment hardening, transport defaults#228
salmonumbrella wants to merge 5 commits intoopenclaw:mainfrom
salmonumbrella:fix/issue-216-recurring-timezone

Conversation

@salmonumbrella
Copy link
Copy Markdown
Contributor

@salmonumbrella salmonumbrella commented Feb 12, 2026

Summary

  • Calendar: Fall back to Etc/GMT±N timezone for recurring events when no regional IANA timezone matches the UTC offset (fixes offset datetimes losing timezone info)
  • Gmail: Harden attachment output path resolution and cache validation — sanitize filenames against path traversal, require exact size match for cache hits, add IsRegular() check
  • Google API: Clone http.DefaultTransport instead of bare http.Transport{} to preserve proxy settings and connection pooling; add supportsAllDrives to drive delete
  • Tests: Add unit tests for sanitizeAttachmentFilename and resolveAttachmentOutputPath with adversarial inputs (traversal, dotdot, trailing separators)

Fixes #216
Fixes #217
Fixes #223

Test plan

  • go test ./... passes (all packages green)
  • Calendar Etc/GMT fallback tested with +02:00, -04:00, and half-hour offsets
  • Attachment path traversal cases covered (../../etc/passwd, ../secret.txt, absolute paths)
  • Cache validation tested: exact size match, stale file re-download, directory not treated as cache hit
  • Transport proxy propagation and TLS 1.2 minimum verified

🤖 Generated with Claude Code

@salmonumbrella salmonumbrella changed the title fix(calendar): fallback recurring timezone for non-US offsets fix: recurring timezone + gmail attachment path/cache issues Feb 12, 2026
@salmonumbrella salmonumbrella changed the title fix: recurring timezone + gmail attachment path/cache issues fix: calendar/gmail reliability + transport hardening Feb 12, 2026
Remove unnecessary TLSClientConfig.Clone() since Transport.Clone()
already deep-copies it. Add unit tests for sanitizeAttachmentFilename
and resolveAttachmentOutputPath covering path traversal and edge cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@salmonumbrella salmonumbrella changed the title fix: calendar/gmail reliability + transport hardening fix: recurring timezone fallback, attachment hardening, transport defaults Feb 12, 2026
- Use strconv.FormatBool in boolString to avoid goconst "true" literal
- Rename shadowed err to writeErr in attachment test
- Use http.NewRequestWithContext in transport test
- Add blank lines before if statements per wsl_v5

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
steipete added a commit that referenced this pull request Feb 14, 2026
Lands #228.

Co-authored-by: salmonumbrella <182032677+salmonumbrella@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
steipete added a commit that referenced this pull request Feb 14, 2026
Lands #228.

Co-authored-by: salmonumbrella <182032677+salmonumbrella@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@steipete
Copy link
Copy Markdown
Collaborator

Landed via #251.

@steipete
Copy link
Copy Markdown
Collaborator

Landed via #251 (merge commit 1a125ef). Thanks! Closing this PR since it was merge-conflicting.

@steipete steipete closed this Feb 14, 2026
klodr pushed a commit to klodr/gogcli that referenced this pull request Apr 22, 2026
Lands openclaw#228.

Co-authored-by: salmonumbrella <182032677+salmonumbrella@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants