From b3ace0e871c06cfc652c4c6695170835b39d500e Mon Sep 17 00:00:00 2001 From: Arthur Zakirov Date: Thu, 2 Nov 2017 14:35:31 +0300 Subject: [PATCH] Check if password provided by a user is empty --- src/utils/pgut.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/pgut.c b/src/utils/pgut.c index f171ff5c..122002f2 100644 --- a/src/utils/pgut.c +++ b/src/utils/pgut.c @@ -1142,6 +1142,9 @@ pgut_connect_extended(const char *pghost, const char *pgport, if (interrupted) elog(ERROR, "interrupted"); + if (password == NULL || password[0] == '\0') + elog(ERROR, "no password supplied"); + continue; } elog(ERROR, "could not connect to database %s: %s",