Commit Graph

23 Commits

Author SHA1 Message Date
Keysat da1bba2e6b Compare operator key in constant time
resolveIdentity and verifyOperatorKey compared the shared
relay_cloud_operator_key with ===/!==, which short-circuits on the first
differing byte — a timing oracle on a high-value key. Use a
timingSafeEqual-based constantTimeEqual, matching admin-auth.js.
2026-06-13 18:22:00 -05:00
Keysat cbd9748a79 Guard meeting :id against path traversal
saveMeeting/loadMeeting/deleteMeeting built path.join(meetingsDir, id +
'.json') straight from req.params.id, so an admin-authed :id like
'../../etc/passwd' could read/write/delete outside internal-meetings/.
Centralize a meetingPath() helper that strips anything outside
[A-Za-z0-9_-] (mirrors output-store.js) and throws on an empty result;
load/delete catch it as 404/no-op. Add a regression test.
2026-06-13 18:22:00 -05:00
Keysat 3a601e166a Bump multer 1.4.5-lts.1 -> ^2.0.1 (DoS CVEs)
multer 1.x is affected by CVE-2025-47944/47935/48997/7338 (malformed
multipart crashes the process / leaks memory). 2.x raises catchable
errors instead. Usage (diskStorage + .single("file")) is unchanged.
Commit the server lockfile so the Dockerfile's npm-ci path pins the fix.
2026-06-13 16:23:26 -05:00
Keysat d2caa98248 Fix credit-counter reset on early subscription renewal
extendUserTier called setUserTier, which unconditionally zeroed
monthly_consumed and re-anchored the cycle. A user who renewed mid-cycle
(or a webhook double-firing across a restart) got their full monthly
allotment back for free. The monthly cycle already rolls on its own
anniversary via ensureRenewalRollover, so renewal must not reset it. Add
resetCycle to setUserTier (default true, preserving operator-grant
behavior); extendUserTier passes false for an in-force subscription and
true only for a brand-new or lapsed one. Add regression tests.
2026-06-13 16:23:26 -05:00
Keysat 8ad7c54da4 Block SSRF on media_url downloads (transcribe-url/summarize-url)
downloadDirect fetched any caller-supplied media_url with redirect-follow
and no host/scheme validation; the route is reachable via a self-chosen
X-Recap-Install-Id, so a caller could probe the operator's LAN or cloud
metadata (169.254.169.254). Add safe-url.js: assertPublicHttpUrl rejects
non-http(s) schemes and hosts resolving to private/loopback/link-local/
reserved ranges, and safeFetch follows redirects manually, re-validating
each hop. Route downloadDirect through it (covers transcribe-url,
summarize-url, and admin-test-run).
2026-06-13 16:23:26 -05:00
Keysat 318c6c4b81 Wire new routes; identity, summarize-url, dashboard, admin 2026-06-13 13:36:30 -05:00
Keysat 04dcf86fa4 Add TTS backends (ElevenLabs, Kokoro) and /relay/tts 2026-06-13 13:36:05 -05:00
Keysat 0aa648706e Add self-serve billing: tiers, credits, BTCPay and Zaprite 2026-06-13 13:36:05 -05:00
Keysat 84d56c94c9 Add Spark Control hardware backend (diarize, queue, discovery) 2026-06-13 13:36:04 -05:00
Keysat 705807e286 Add internal-meetings pipeline and post-hoc speaker tools 2026-06-13 13:35:53 -05:00
local b7f75904bb v0.2.11 /relay/capabilities + /relay/transcribe-url (yt-dlp in container) 2026-05-12 01:33:34 -05:00
local 0a0fa009ec v0.2.10 hardware backend URL normalization + path fallback 2026-05-12 01:00:48 -05:00
local 8ffc3ffb73 v0.2.9 Gemini model selects + fallback chain 2026-05-12 00:45:41 -05:00
local 05ebeb5d51 v0.2.8 operator dashboard with per-call audit log + cost tracking 2026-05-12 00:26:59 -05:00
local 9af70302b1 v0.2.7 configurable Gemini models + per-pipeline backend preference 2026-05-12 00:15:07 -05:00
local cd377683fb v0.2.6 calendar-anniversary billing 2026-05-11 23:02:57 -05:00
local 45c8462fa2 v0.2.5 grouped actions 2026-05-11 22:12:02 -05:00
local e612e8b8e8 v0.2.4 max-monthly union + /relay/policy 2026-05-11 22:02:38 -05:00
local 6797aae404 v0.2.3 Core tier 10/5/5 split + dynamic health version 2026-05-11 21:53:50 -05:00
local 07fe14010c v0.2.2 balance peek endpoint 2026-05-11 21:34:31 -05:00
local c9f051cd07 v0.2.1 model names config-driven 2026-05-11 20:27:19 -05:00
local cccbee27e4 v0.2 hardware backend 2026-05-11 20:14:50 -05:00
local b9d86fa303 initial relay scaffold 2026-05-11 20:03:27 -05:00