postgres.git / summary / log / commit / refs
commit 341996248e4d720556689e5fb3da7a408cf94228
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu Jul 27 16:07:48 2023 +0000
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
src/backend/libpq/hba.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index 64e59d4d88a..40ad8c12b47 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -54,7 +54,7 @@
#endif
-#define MAX_TOKEN 256
+#define MAX_TOKEN 10240
/* callback data for check_network_callback */
typedef struct check_network_data
[parent: c5c5832600e9]