Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6c4637a

Browse files
committed
Disallow empty passwords in LDAP authentication, the same way
we already do it for PAM.
1 parent4183b10 commit6c4637a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/backend/libpq/auth.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.182 2009/06/11 14:48:57 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.183 2009/06/25 11:30:08 mha Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2066,6 +2066,13 @@ CheckLDAPAuth(Port *port)
20662066
if (passwd==NULL)
20672067
returnSTATUS_EOF;/* client wouldn't send password */
20682068

2069+
if (strlen(passwd)==0)
2070+
{
2071+
ereport(LOG,
2072+
(errmsg("empty password returned by client")));
2073+
returnSTATUS_ERROR;
2074+
}
2075+
20692076
ldap=ldap_init(port->hba->ldapserver,port->hba->ldapport);
20702077
if (!ldap)
20712078
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp