Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b3ace0e

Browse files
committed
Check if password provided by a user is empty
1 parent 304122d commit b3ace0e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils/pgut.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,9 @@ pgut_connect_extended(const char *pghost, const char *pgport,
11421142
if (interrupted)
11431143
elog(ERROR, "interrupted");
11441144

1145+
if (password == NULL || password[0] == '\0')
1146+
elog(ERROR, "no password supplied");
1147+
11451148
continue;
11461149
}
11471150
elog(ERROR, "could not connect to database %s: %s",

0 commit comments

Comments
 (0)