- Notifications
You must be signed in to change notification settings - Fork5.2k
Commite7ff968
committed
libpq: Be strict about cancel key lengths
The protocol documentation states that the maximum length of a cancelkey is 256 bytes. This starts checking for that limit in libpq.Otherwise third party backend implementations will probably startusing more bytes anyway. We also start requiring that a protocol 3.0connection does not send a longer cancel key, to make sure thatservers don't start breaking old 3.0-only clients by accident. Finallythis also restricts the minimum key length to 4 bytes (both in theprotocol spec and in the libpq implementation).Author: Jelte Fennema-Nio <postgres@jeltef.nl>Reviewed-by: Jacob Champion <jchampion@postgresql.org>Discussion:https://www.postgresql.org/message-id/df892f9f-5923-4046-9d6f-8c48d8980b50@iki.fiBackpatch-through: 181 parent8aa287c commite7ff968
File tree
2 files changed
+22
-1
lines changed- doc/src/sgml
- src/interfaces/libpq
2 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4163 | 4163 | | |
4164 | 4164 | | |
4165 | 4165 | | |
4166 | | - | |
| 4166 | + | |
4167 | 4167 | | |
4168 | 4168 | | |
4169 | 4169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1569 | 1569 | | |
1570 | 1570 | | |
1571 | 1571 | | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
1572 | 1593 | | |
1573 | 1594 | | |
1574 | 1595 | | |
| |||
0 commit comments
Comments
(0)