Skip to content

v0.3.0 — Session Reliability & Security Hardening

Latest

Choose a tag to compare

@FelixIsaac FelixIsaac released this 03 Jun 16:18
· 32 commits to main since this release
v0.3.0

What's New

Session Reliability

  • LoggedOut/StreamReplaced watchdog — bridge now calls MarkDisconnected() on logout events so the watchdog goroutine detects the broken state and Docker restart: unless-stopped brings it back automatically
  • QR/connect timeout watchdog — both the 3-minute QR scan timeout and 30-second reconnect timeout now call MarkDisconnected(), eliminating hung containers that required manual restarts
  • Event-driven connect — replaced time.Sleep(2s) with a proper events.Connected channel wait (30s timeout) on existing-session startup
  • SQLite WAL modewhatsapp.db and messages.db now use _journal_mode=WAL&_busy_timeout=5000 for safe concurrent reads during bridge writes
  • UseRetryMessageStore = true — retry receipts persist across restarts, preventing message dedup failures after crashes
  • SetForceActiveDeliveryReceipts(true) — delivery receipts sent even when not explicitly marked online
  • whatsmeow bumped to v0.0.0-20260602 — fixes 405 Client Outdated errors reported by community

Security

  • API_BIND_HOST defaults to 127.0.0.1 — bridge REST API no longer binds to all interfaces by default (closes #215)
  • CORS hardened127.0.0.1 variants added alongside localhost so browser IP-based requests work without wildcards
  • Docker: external port already bound to 127.0.0.1:8180; API_BIND_HOST=0.0.0.0 set only inside the internal Docker network

Connection Webhooks

  • New connection_event webhook payload fires on connected, disconnected, logged_out, pair_success, pair_error
  • needs_pairing field added to /api/health and /api/status responses
  • Circuit breaker callback fires before AutoReconnect gives up (30 consecutive failures)
  • Presence ping interval configurable via PRESENCE_PING_INTERVAL env var (default 20m, was hardcoded 3m)

MCP Server

  • DB path resolution centralized in lib/utils.py — single source of truth for messages.db and whatsapp.db paths
  • Fail-loudly on missing messages.db at import time (set WA_SKIP_DB_CHECK=1 to bypass in tests)

Docker / Setup

  • Fixed bootstrapping deadlock: web-ui now uses depends_on: service_started instead of service_healthy — UI starts immediately so you can scan QR when bridge needs pairing
  • New setup.ps1 — Windows one-shot setup (Docker Desktop, Task Scheduler jobs, uv sync, .env bootstrap)
  • New Makefilemake pair PHONE=+60..., make status, make reconnect, make logs

Upgrade Notes

  • If upgrading from v0.2.x: rebuild images (docker compose build && docker compose up -d)
  • New env vars (all optional): API_BIND_HOST, PRESENCE_PING_ENABLED, PRESENCE_PING_INTERVAL, WA_STORE_PATH, WA_SKIP_DB_CHECK
  • Docker Compose: API_BIND_HOST=0.0.0.0 is set automatically in docker-compose.yaml for inter-container access