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 | 288b4288c3db3af24404cf6d4c1d9d5a9c9c1922 (patch) | |
tree | 15a78fbd131ccea5cda437694e266642dff2ad79 | |
parent | 291c0254025bb67ceedeaca8531f1b14b8aaeeff (diff) | |
download | postgresql-288b4288c3db3af24404cf6d4c1d9d5a9c9c1922.tar.gz postgresql-288b4288c3db3af24404cf6d4c1d9d5a9c9c1922.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
-rw-r--r-- | src/backend/libpq/hba.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index d9a60843470..55dca8fc57d 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -53,8 +53,8 @@ #endif -#define MAX_TOKEN 256 -#define MAX_LINE 8192 +#define MAX_TOKEN 10240 +#define MAX_LINE 20480 /* callback data for check_network_callback */ typedef struct check_network_data |