8000 Raise fixed token-length limit in hba.c. · postgres/postgres@1d031ad · GitHub
[go: up one dir, main page]

Skip to content

Commit 1d031ad

Browse files
committed
Raise fixed token-length limit in hba.c.
Historically, hba.c limited tokens in the authentication configuration files (pg_hba.conf and pg_ident.conf) to less than 256 bytes. We have seen a few reports of this limit causing problems; notably, for moderately-complex LDAP configurations. Increase the limit to 10240 bytes as a low-risk stop-gap solution. In v13 and earlier, this also requires raising MAX_LINE, the limit on overall line length. I'm hesitant to make this code consume too much stack space, so I only raised that to 20480 bytes. Discussion: https://postgr.es/m/1588937.1690221208@sss.pgh.pa.us
1 parent fd7c944 commit 1d031ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/libpq/hba.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
#endif
5454

5555

56-
#define MAX_TOKEN 256
57-
#define MAX_LINE 8192
56+
#define MAX_TOKEN 10240
57+
#define MAX_LINE 20480
5858

5959
/* callback data for check_network_callback */
6060
typedef struct check_network_data

0 commit comments

Comments
 (0)
0