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

Commit60ce452

Browse files
Make libpq error messages consistent for translation
The errormessage for an incorrect require_auth method wasn't using thecommon "invalid %s value" errormessage which lessens the burden on ourtranslators. Fix by changing to that format to make use of existingtranslations and to make error messages consistent in wording.Reported and fixed by Gurjeet Singh with some tweaking by myself.Author: Gurjeet Singh <gurjeet@singh.im>Discussion:https://postgr.es/m/CABwTF4Xu3g9zohJ9obu8m7MKbf8g63NgpRDjwqPHQgAtB+Gb8Q@mail.gmail.com
1 parent0a16512 commit60ce452

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,8 +1407,8 @@ connectOptions2(PGconn *conn)
14071407
else
14081408
{
14091409
conn->status=CONNECTION_BAD;
1410-
libpq_append_conn_error(conn,"invalidrequire_auth method: \"%s\"",
1411-
method);
1410+
libpq_append_conn_error(conn,"invalid%s value: \"%s\"",
1411+
"require_auth",method);
14121412

14131413
free(part);
14141414
return false;

‎src/test/authentication/t/001_password.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ sub test_conn
264264
$node->connect_fails(
265265
"user=scram_role require_auth=none,abcdefg",
266266
"unknown require_auth methods are rejected",
267-
expected_stderr=>qr/invalid require_authmethod: "abcdefg"/);
267+
expected_stderr=>qr/invalid require_authvalue: "abcdefg"/);
268268

269269
# For plain "password" method, all users should also be able to connect.
270270
reset_pg_hba($node,'all','all','password');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp