mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
Tweak some SCRAM error messages and code comments
Clarify/correct some error messages, fix up some code comments that confused SASL and SCRAM, and other minor fixes. No changes in functionality.
This commit is contained in:
@@ -228,7 +228,7 @@ pg_fe_scram_exchange(void *opaq, char *input, int inputlen,
|
||||
{
|
||||
*success = false;
|
||||
printfPQExpBuffer(errorMessage,
|
||||
libpq_gettext("invalid server signature\n"));
|
||||
libpq_gettext("incorrect server signature\n"));
|
||||
}
|
||||
*done = true;
|
||||
state->state = FE_SCRAM_FINISHED;
|
||||
@@ -249,7 +249,7 @@ error:
|
||||
}
|
||||
|
||||
/*
|
||||
* Read value for an attribute part of a SASL message.
|
||||
* Read value for an attribute part of a SCRAM message.
|
||||
*/
|
||||
static char *
|
||||
read_attr_value(char **input, char attr, PQExpBuffer errorMessage)
|
||||
@@ -260,7 +260,7 @@ read_attr_value(char **input, char attr, PQExpBuffer errorMessage)
|
||||
if (*begin != attr)
|
||||
{
|
||||
printfPQExpBuffer(errorMessage,
|
||||
libpq_gettext("malformed SCRAM message (%c expected)\n"),
|
||||
libpq_gettext("malformed SCRAM message (attribute \"%c\" expected)\n"),
|
||||
attr);
|
||||
return NULL;
|
||||
}
|
||||
@@ -269,7 +269,7 @@ read_attr_value(char **input, char attr, PQExpBuffer errorMessage)
|
||||
if (*begin != '=')
|
||||
{
|
||||
printfPQExpBuffer(errorMessage,
|
||||
libpq_gettext("malformed SCRAM message (expected = in attr '%c')\n"),
|
||||
libpq_gettext("malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"),
|
||||
attr);
|
||||
return NULL;
|
||||
}
|
||||
@@ -508,7 +508,7 @@ read_server_final_message(fe_scram_state *state, char *input,
|
||||
char *errmsg = read_attr_value(&input, 'e', errormessage);
|
||||
|
||||
printfPQExpBuffer(errormessage,
|
||||
libpq_gettext("error received from server in SASL exchange: %s\n"),
|
||||
libpq_gettext("error received from server in SCRAM exchange: %s\n"),
|
||||
errmsg);
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user