Folks, At least two cloud providers are now stuffing large amounts of information into the password field. This change makes it possible to accommodate that usage in interactive sessions.
Best, David. -- David Fetter <david(at)fetter(dot)org> http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
>From 168c380548d1f97e4f6e9245851c22029931e8b5 Mon Sep 17 00:00:00 2001 From: David Fetter <da...@fetter.org> Date: Mon, 20 Jan 2020 09:58:19 -0800 Subject: [PATCH v1] Increase psql's password buffer size To: hackers MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.24.1" This is a multi-part message in MIME format. --------------2.24.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit At least two cloud providers are now stuffing large amounts of information into the password field. This makes it possible to accommodate that usage in interactive sessions. diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index e111cee556..84c2a0a37f 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -2845,7 +2845,7 @@ copy_previous_query(PQExpBuffer query_buf, PQExpBuffer previous_buf) static char * prompt_for_password(const char *username) { - char buf[100]; + char buf[2048]; if (username == NULL || username[0] == '\0') simple_prompt("Password: ", buf, sizeof(buf), false); --------------2.24.1--