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

Commit167a22b

Browse files
committed
Fix up references to scram-sha-256
pg_hba_file_rules erroneously reported this as scram-sha256. Fix that.To avoid future errors and confusion, also adjust documentation linksand internal symbols to have a separator between "sha" and "256".Reported-by: Christophe Courtois <christophe.courtois@dalibo.com>Author: Michael Paquier <michael.paquier@gmail.com>
1 parent92123c6 commit167a22b

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

‎doc/src/sgml/protocol.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ On error, the server can abort the authentication at any stage, and send an
14201420
ErrorMessage.
14211421
</para>
14221422

1423-
<sect2 id="sasl-scram-sha256">
1423+
<sect2 id="sasl-scram-sha-256">
14241424
<title>SCRAM-SHA-256 authentication</title>
14251425

14261426
<para>

‎src/backend/libpq/auth.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -883,8 +883,8 @@ CheckSCRAMAuth(Port *port, char *shadow_pass, char **logdetail)
883883
* SCRAM-SHA-256 at the moment). The extra "\0" is for an empty string to
884884
* terminate the list.
885885
*/
886-
sendAuthRequest(port,AUTH_REQ_SASL,SCRAM_SHA256_NAME"\0",
887-
strlen(SCRAM_SHA256_NAME)+2);
886+
sendAuthRequest(port,AUTH_REQ_SASL,SCRAM_SHA_256_NAME"\0",
887+
strlen(SCRAM_SHA_256_NAME)+2);
888888

889889
/*
890890
* Initialize the status tracker for message exchanges.
@@ -950,7 +950,7 @@ CheckSCRAMAuth(Port *port, char *shadow_pass, char **logdetail)
950950
* is an error.
951951
*/
952952
selected_mech=pq_getmsgrawstring(&buf);
953-
if (strcmp(selected_mech,SCRAM_SHA256_NAME)!=0)
953+
if (strcmp(selected_mech,SCRAM_SHA_256_NAME)!=0)
954954
{
955955
ereport(ERROR,
956956
(errcode(ERRCODE_PROTOCOL_VIOLATION),

‎src/backend/libpq/hba.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static const char *const UserAuthName[] =
126126
"ident",
127127
"password",
128128
"md5",
129-
"scram-sha256",
129+
"scram-sha-256",
130130
"gss",
131131
"sspi",
132132
"pam",

‎src/include/libpq/scram.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#definePG_SCRAM_H
1515

1616
/* Name of SCRAM-SHA-256 per IANA */
17-
#defineSCRAM_SHA256_NAME "SCRAM-SHA-256"
17+
#defineSCRAM_SHA_256_NAME "SCRAM-SHA-256"
1818

1919
/* Status codes for message exchange */
2020
#defineSASL_EXCHANGE_CONTINUE0

‎src/interfaces/libpq/fe-auth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ pg_SASL_init(PGconn *conn, int payloadlen)
532532
/*
533533
* Do we support this mechanism?
534534
*/
535-
if (strcmp(mechanism_buf.data,SCRAM_SHA256_NAME)==0)
535+
if (strcmp(mechanism_buf.data,SCRAM_SHA_256_NAME)==0)
536536
{
537537
char*password;
538538

@@ -550,7 +550,7 @@ pg_SASL_init(PGconn *conn, int payloadlen)
550550
conn->sasl_state=pg_fe_scram_init(conn->pguser,password);
551551
if (!conn->sasl_state)
552552
gotooom_error;
553-
selected_mechanism=SCRAM_SHA256_NAME;
553+
selected_mechanism=SCRAM_SHA_256_NAME;
554554
}
555555
}
556556

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp