Commit Graph
681 Commits
Author SHA1 Message Date
Mike Cao d2b4aa174e Rate limit dynamic client registration per source address
Replace the process-wide registration counter used without Redis with a
shared per-key fixed-window limiter, so one requester can no longer
exhaust the registration budget for every other client on the process.
The in-memory fallback is bounded (expired windows are swept, then the
oldest keys are shed) so memory stays constant under key churn.

Also fixes checkMcpRateLimit inverting redis.rateLimit's result: it
resolves true once the counter reaches its threshold, so with Redis the
MCP endpoint was denying requests below the limit and allowing those
above it. Both call sites now share the same limiter and semantics.
2026-09-05 17:57:20 -07:00
Mike Cao 67449d76ef Harden OAuth metadata fetching and make token rotation transactional 2026-09-05 14:09:33 -07:00
Mike Cao 65bf19e067 Add OAuth-protected MCP server with generated API client packages 2026-09-03 16:58:47 -07:00
Mike Cao f1c5b4f7bb Add account API key management 2026-09-01 21:50:07 -07:00
Mike Cao e1a4934038 Generate explicit OpenAPI contracts for API routes 2026-09-01 15:09:10 -07:00
Mike Cao 64e4cc1c3b Add website annotations with chart markers and CRUD management 2026-08-27 00:09:03 -07:00
Francis Cao 0a77e50da1 Harden 2FA APi routes and UI when 2FA env var missing. Closes #4443. 2026-08-14 10:32:09 -07:00
NoiceHax a40b418038 fix(2fa): gate two-factor auth when the encryption key is missing
TWO_FACTOR_ENCRYPTION_KEY has no default, so instances upgrading to 3.3
without setting it hit an unhandled throw from encryptSecret: the setup
dialog only reported "Something went wrong", and where 2FA was required
the blocking dialog made the whole app unusable. The status endpoint now
reports 2FA as not required while the key is missing or invalid, and
setup initiation returns 503 with a two-factor-error-not-configured code
that the setup dialog renders as a readable message. Also documents the
variable in the README and the example compose file.

Closes #4443
2026-08-13 22:39:31 +05:30
Francis Cao 3e729bc0e4 harden eventData delete. Add translations. Closes #4435. 2026-08-10 12:41:41 -07:00
Francis Cao 9e0034781a recorder.js CORS header implementation. Closes #4426 2026-08-04 15:34:36 -07:00
Francis Cao b3aec54bb3 Fix excludeBounce query, simplify bounce definition for SPA websites, query routing for performance, add tests 2026-07-30 09:34:35 -07:00
Mike Cao f84635b7a5 Merge pull request #4408 from maxiride/feature/bounce-calculation-v3
Feat: Improve bounce calculations with configurable threshold v3
2026-07-28 20:55:12 -07:00
Mike Cao b5d27620e7 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2026-07-28 14:07:19 -07:00
Mike Cao adba113b04 Load subscription data from API before rendering replay and heatmap views 2026-07-28 14:07:09 -07:00
Mike Cao 00faf04d5c Merge pull request #4356 from Niki2k1/runtime-allowed-frame-urls
Resolve ALLOWED_FRAME_URLS from the runtime environment in Docker
2026-07-27 21:05:12 -07:00
Francis Cao 3136e3590a Revert "Move timezone selection to query parameters"
This reverts commit 4d7930060c.
2026-07-27 10:32:28 -07:00
Mike Cao 4d7930060c Move timezone selection to query parameters 2026-07-27 02:24:59 -07:00
Federico D'Eredità 82a5a12208 refactor(constants): simplify BOUNCE_THRESHOLD parsing
`parseInt(undefined, 10)` returns NaN and the `|| 1` fallback already
covers it, so the `|| '1'` default was redundant.
2026-07-26 18:49:59 +02:00
Federico D'Eredità 19fcde2c9c refactor(queries): replace hardcoded event types with constants
Replaced hardcoded `event_type` values with named constants from
`EVENT_TYPE`, as in #3614. Added the `BOUNCE_THRESHOLD` constant and
documented it in `docker-compose.yml`.
2026-07-26 18:49:58 +02:00
Mike Cao fb56a8f922 Merge branch 'dev' into fix/improve-ir-fa-support 2026-07-25 10:42:33 -07:00
Mike Cao 0714ebdbe3 Merge pull request #4397 from Sagittarius/codex/clickhouse-22-date-format
fix: support ClickHouse 22 date formats
2026-07-24 21:26:39 -07:00
Francis Cao f9850f02b3 add session delete feature to relational only. add test, share conditions, and permissions. Closes #2940 2026-07-24 15:47:01 -07:00
Mike Cao 0b31d3a274 Mark Hebrew locale as RTL 2026-07-24 14:36:54 -07:00
Mike Cao 65e810ec79 Add coverage for core utility behavior 2026-07-24 13:52:37 -07:00
Mike Cao b70eda56e6 Merge pull request #4394 from luca-seemann/fix/client-ip-header-xff-chain
Fix client IP resolution when CLIENT_IP_HEADER is set to x-forwarded-for
2026-07-23 15:27:51 -07:00
Mike Cao 33ac648d1f Merge pull request #4402 from sarmah-rup/fix/format-long-number-billions
fix: formatLongNumber shows billions ~1000x too large on metric tiles
2026-07-23 14:21:08 -07:00
Francis Cao 13d18c0880 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2026-07-23 11:50:39 -07:00
Francis Cao d05d9c4f34 Session and event property filtering. Closes #2945. Closes #4008. 2026-07-23 11:50:35 -07:00
Mike Cao aafe068bc1 Merge branch 'dev' into feat-2FA 2026-07-23 11:14:59 -07:00
Francis Cao 58ee28a55e remove session recalculate and related queries 2026-07-21 12:33:41 -07:00
Rup Sarmah 0715aef477 fix(format): divide by 1e9 in formatLongNumber billions branch
The billions branch of formatLongNumber divided by 1000000 while
appending the 'b' suffix, so values >= 1e9 rendered about 1000x too
large (1000000000 became '1000.0b' instead of '1.0b'). Divide by
1000000000 to match the 'b' unit, consistent with the sibling
formatLongCurrency. Add regression tests for the billions branch.
2026-07-21 17:52:40 +05:30
Mike Cao cb801230cc Fix identified session ID generation 2026-07-19 10:43:21 -07:00
Mike Cao 4691a344c5 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2026-07-18 01:35:25 -07:00
Mike Cao bc97f9f439 Enforce a per-plan team limit when creating teams in cloud mode 2026-07-18 01:35:13 -07:00
Vincent Chan e7c18860f1 fix: support ClickHouse 22 date formats 2026-07-18 03:23:54 +08:00
Francis Cao 8004afe63d Punycode support. Closes #2170 2026-07-17 10:22:37 -07:00
Luca Seemann 65b508c22a Fix custom CLIENT_IP_HEADER not parsing x-forwarded-for/forwarded chains 2026-07-17 16:31:06 +02:00
Leon Acosta 2771abc6a7 verify Kafka broker TLS certificate by default
When SASL credentials are present, getClient() connected with
`rejectUnauthorized: false`, so the SASL password was sent over a TLS
connection whose broker certificate was never verified — a MITM could
present any certificate and capture the credentials.

Verify by default; set KAFKA_SSL_ALLOW_UNAUTHORIZED=true to opt out for
self-signed brokers.
2026-07-04 18:45:45 +07:00
Francis Cao 735d85c7af fix channel attribution for organic Facebook traffic. Closes #4297 2026-07-02 11:51:46 -07:00
Francis Cao 4c4071b270 keep createSession raw writes on primary when replicas are enabled 2026-07-01 09:53:08 -07:00
Francis Cao ab5b1bf354 Board component, security, test updates 2026-06-29 18:17:57 -07:00
Niklas LauschandClaude Opus 4.8 ecf9b3b0a2 Resolve ALLOWED_FRAME_URLS from the runtime environment in Docker
The Content-Security-Policy is defined in next.config.ts headers(), which Next
serializes at build time, so ALLOWED_FRAME_URLS only takes effect when it is set
before `next build`. The published Docker images are built without it, so
frame-ancestors cannot be configured at runtime and iframe embedding requires a
custom image (#3793, #2407).

Move the policy into a shared getContentSecurityPolicy() and set the header from
the Docker proxy (docker/proxy.ts) on every response, where runtime env such as
CORS_MAX_AGE and DISABLE_LOGIN is already handled. next.config.ts skips the
build-time CSP when the proxy is present, so exactly one header is sent.

Non-Docker builds are unchanged: the build-time CSP still applies and
ALLOWED_FRAME_URLS keeps working as a build-time variable there.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 13:31:37 +02:00
Francis Cao 8a0bdc2727 heatmap migration/code clean-up 2026-06-23 15:01:00 -07:00
Francis Cao 3888ec6f4f Allow legacy stateless tokens that were minted without a password fingerprint. 2026-06-23 13:24:55 -07:00
Francis Cao 9defe7e3e0 Only enforce password-change invalidation for sessions that include a password fingerprint. 2026-06-23 00:27:44 -07:00
Francis Cao 727490269b Invalidate auth sessions after password changes 2026-06-22 23:31:12 -07:00
Francis Cao 2e74b3ebae sanitize logging of sensitive info. 2026-06-22 23:03:01 -07:00
Francis Cao 129681ebd7 fix: harden analytics writes and hide internal server errors from client 2026-06-22 22:07:07 -07:00
Francis Cao c61c01e3bb implement session replay filters 2026-06-17 11:38:57 -07:00
Francis Cao f3ce0e64ca typescript fixes, replayer close error, show page toggle fix. 2026-06-17 10:02:12 -07:00