Skip to content

[pull] master from cube-js:master - #619

Merged
pull[bot] merged 2 commits into
code:masterfrom
cube-js:master
Jul 23, 2026
Merged

[pull] master from cube-js:master#619
pull[bot] merged 2 commits into
code:masterfrom
cube-js:master

Conversation

@pull

@pull pull Bot commented Jul 23, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

ovr added 2 commits July 23, 2026 14:43
Validate every frontend message length before allocating, instead of trusting the client-supplied frame length:

* **Startup packet** (incl. SSLRequest/GSSENC/CancelRequest): capped at 10 KiB, in line with PostgreSQL's `MAX_STARTUP_PACKET_LENGTH`. Oversized frames are rejected with a protocol error before any allocation.

* **Authentication response** (e.g. the password message, read before the session is authenticated): capped at 64 KiB. PostgreSQL uses `PQ_SMALL_MESSAGE_LIMIT` (10,000 bytes) here, but CubeSQL accepts JWTs as passwords, which need more headroom.

* **Messages on authenticated connections**: capped at 16 MiB. PostgreSQL allows ~1 GiB (`PQ_LARGE_MESSAGE_LIMIT`), but CubeSQL has no COPY/bulk-ingestion path — the largest legitimate payloads are query texts (Query/Parse) and Bind parameters, and 10 MiB comfortably covers machine-generated SQL from BI tools.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.