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

Commita8926e0

Browse files
committed
Salt fix for password, from Tatsuo Ishii.
1 parent241a87b commita8926e0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎src/backend/libpq/password.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ verify_password(char *user, char *password, Port *port,
2424
char*p,
2525
*test_user,
2626
*test_pw;
27-
charsalt[3];
2827

2928
find_hba_entry(DataDir,port->raddr.in.sin_addr,database,
3029
&host_ok,&userauth,pw_file_name, true);
@@ -90,14 +89,12 @@ verify_password(char *user, char *password, Port *port,
9089
if (test_pw[strlen(test_pw)-1]=='\n')
9190
test_pw[strlen(test_pw)-1]='\0';
9291

93-
StrNCpy(salt,test_pw,3);
94-
9592
if (strcmp(user,test_user)==0)
9693
{
9794
/* we're outta here one way or the other. */
9895
FreeFile(pw_file);
9996

100-
if (strcmp(crypt(password,salt),test_pw)==0)
97+
if (strcmp(crypt(password,test_pw),test_pw)==0)
10198
{
10299
/* it matched. */
103100
returnSTATUS_OK;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp