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

Commit505b5d2

Browse files
committed
Abort authentication if the client selected an invalid SASL mechanism.
Previously, the server would log an error, but then try to continue withSCRAM-SHA-256 anyway.Michael PaquierDiscussion:https://www.postgresql.org/message-id/CAB7nPqR0G5aF2_kc_LH29knVqwvmBc66TF5DicvpGVdke68nKw@mail.gmail.com
1 parent073ce40 commit505b5d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/backend/libpq/auth.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,9 +934,13 @@ CheckSCRAMAuth(Port *port, char *shadow_pass, char **logdetail)
934934
*/
935935
selected_mech=pq_getmsgrawstring(&buf);
936936
if (strcmp(selected_mech,SCRAM_SHA256_NAME)!=0)
937+
{
937938
ereport(COMMERROR,
938939
(errcode(ERRCODE_PROTOCOL_VIOLATION),
939940
errmsg("client selected an invalid SASL authentication mechanism")));
941+
pfree(buf.data);
942+
returnSTATUS_ERROR;
943+
}
940944

941945
inputlen=pq_getmsgint(&buf,4);
942946
if (inputlen==-1)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp