Re: [PATCH] Fixed malformed error message on malformed SCRAM message.

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: [PATCH] Fixed malformed error message on malformed SCRAM message.
Date: 2017-05-29 21:31:02
Message-ID: CAB7nPqQrU1QyagF0i0MVw5_Cxy+YF+kJj5m8X5+qnNawn_UJuQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Mon, May 29, 2017 at 2:06 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> These messages look all wrong to me.

So your complain would be to do the following for each error message
that uses parenthesis to include details? Like that I suppose:
--- a/src/backend/libpq/auth-scram.c
+++ b/src/backend/libpq/auth-scram.c
@@ -283,11 +283,13 @@ pg_be_scram_exchange(void *opaq, char *input,
int inputlen,
if (inputlen == 0)
ereport(ERROR,
(errcode(ERRCODE_PROTOCOL_VIOLATION),
- (errmsg("malformed SCRAM message (empty message)"))));
+ errmsg("malformed SCRAM message"),
+ errdetail("Empty message.")));
if (inputlen != strlen(input))
ereport(ERROR,
(errcode(ERRCODE_PROTOCOL_VIOLATION),
- (errmsg("malformed SCRAM message (length mismatch)"))));
+ errmsg("malformed SCRAM message"),
+ errdetail("Length mismatch.")));
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2017-05-29 21:40:21 Re: [PATCH] Fixed malformed error message on malformed SCRAM message.
Previous Message Andres Freund 2017-05-29 21:15:11 Re: [PATCH] Fixed malformed error message on malformed SCRAM message.

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-05-29 21:40:21 Re: [PATCH] Fixed malformed error message on malformed SCRAM message.
Previous Message Andres Freund 2017-05-29 21:15:11 Re: [PATCH] Fixed malformed error message on malformed SCRAM message.