13 Commits

Author SHA1 Message Date
zene
10e11952bd changed style of two comments 2024-10-05 19:54:02 +03:00
zene
0290507ff2 remove global atomics 2024-10-04 09:26:37 +03:00
zene
8f8470edaf add message body size limits in frontend and backend 2024-09-27 15:17:47 +03:00
Jack Christensen
adbb38f298 Do not allow protocol messages larger than ~1GB
The PostgreSQL server will reject messages greater than ~1 GB anyway.
However, worse than that is that a message that is larger than 4 GB
could wrap the 32-bit integer message size and be interpreted by the
server as multiple messages. This could allow a malicious client to
inject arbitrary protocol messages.

https://github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghv
2024-03-04 09:09:29 -06:00
jeremy.spriet
603c8c1e90 feat(pgproto3/backend): add a SetMaxBodyLen to limit the max body length for the receive 2023-12-23 10:25:35 -06:00
Alexey Palazhchenko
f839d501a7 Apply gofmt -s
And add CI check for that.
2023-01-24 07:55:00 -06:00
Mark Chambers
516300aabf spelling: successfully, compatibility 2023-01-16 20:06:01 -06:00
Jack Christensen
b74c109f61 Optimize tracing
The addition of tracing caused messages to escape to the heap. By
avoiding interfaces the messages no longer escape.
2022-05-21 17:22:58 -05:00
Jack Christensen
f2e96156a0 Add message tracing 2022-05-21 14:43:04 -05:00
Jack Christensen
5714896b10 Restructure sending messages
Use an internal buffer in pgproto3.Frontend and pgproto3.Backend instead
of directly writing to the underlying net.Conn. This will allow tracing
messages as well as simplify pipeline mode.
2022-05-21 11:06:44 -05:00
Jack Christensen
a92f1df1df Merge remote-tracking branch 'pgproto3/master' into v5-dev
Pull in pgproto3 changes and update for pgx v5
2022-04-23 10:43:48 -05:00
Jack Christensen
2e0ec225de Make Chunkreader an internal implementation detail 2022-02-26 08:50:46 -06:00
Jack Christensen
04476c4a13 Move pgproto3 to subdirectory 2022-02-21 11:57:34 -06:00