- Require per-request/image mode for group image pricing so token-mode
group cards no longer settle images at $0.
- Force per-image billing for channel token pricing when the group switch
is enabled, matching the OpenAI pipeline.
- Add an ImageEndpoint marker so the switch only applies to dedicated
image endpoints; mixed Responses/Chat/WS requests keep token billing.
- Only fall back to one image when the switch is enabled, preserving the
previous count semantics when it is off.
- Validate image_count_billing in GroupService and gate the admin
checkbox on allow_image_generation.
- Bump the API key auth snapshot version for the new group field.
Use strconv to reject pagination values outside the native int range,
reuse PaginationParams.Offset for API key slices, and derive test bounds
from math.MaxInt. Cover parsing, response metadata, strict handlers, and
in-memory pagination at the arithmetic boundaries.
DOMPurify <=3.4.16 is affected by two advisories published 2026-10-22:
- GHSA-cg2g-xh64-v4q7 (critical): SAFE_FOR_TEMPLATES bypass via split
template expressions in attached shadow root content on DOM output modes
- GHSA-mrv2-3pqr-j5jr (high): IN_PLACE hook removing a parent/sibling leaves
detached subtree event handlers armed
Bump the direct dependency and the pnpm override floor to 3.4.17 so the
mermaid-transitive copy dedupes to the same patched version. Lockfile-only
regen via pnpm 9 (matches CI); no other package changes.
A page such as 9223372036854775807 passed every pagination check, so
(page-1)*pageSize wrapped around. With an even page size the offset
became negative and PostgreSQL rejected the query with "OFFSET must not
be negative"; paths that slice in memory (paginateSlice, balance history
merge) panicked with a negative slice bound. Both surfaced as HTTP 500 on
list endpoints such as /api/v1/admin/users, /api/v1/usage, /api/v1/keys
and /api/v1/admin/payment/orders.
- PaginationParams.Offset saturates Page at MaxInt/limit, so offset and
offset+limit both stay within int.
- ParsePagination clamps page the same way, which covers the repositories
that compute (page-1)*pageSize themselves.
- The prompt audit event list and the OpenAI token stats filter parse page
on their own; they now reject an overflowing page with 400, like other
invalid pagination input there.