diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2023-07-27 12:07:48 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2023-07-27 12:07:48 -0400 |
commit | 313ceda2fe2ee8dd903ad4773f54de14807807c6 (patch) | |
tree | 69e29f8a3899365f29614f38e9fbf43668859471 /src | |
parent | 2864eb977a6e49d4355b679d7e1e54f01a231b80 (diff) | |
download | postgresql-313ceda2fe2ee8dd903ad4773f54de14807807c6.tar.gz postgresql-313ceda2fe2ee8dd903ad4773f54de14807807c6.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/libpq/hba.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 327a4b42af7..09c0b421c32 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 |