Skip to content

Commit ad30d36

Browse files
committed
Document actual string that has to be returned by the client for MD5
authentication. Report and pseudo code by Cyan Ogilvie
1 parent 0180bd6 commit ad30d36

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

doc/src/sgml/protocol.sgml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,15 @@
293293
<listitem>
294294
<para>
295295
The frontend must now send a PasswordMessage containing the
296-
password encrypted via MD5, using the 4-character salt
297-
specified in the AuthenticationMD5Password message. If
298-
this is the correct password, the server responds with an
299-
AuthenticationOk, otherwise it responds with an ErrorResponse.
296+
password (with username) encrypted via MD5, then encrypted
297+
again using the 4-byte random salt specified in the
298+
AuthenticationMD5Password message. If this is the correct
299+
password, the server responds with an AuthenticationOk,
300+
otherwise it responds with an ErrorResponse. The actual
301+
PasswordMessage can be computed in SQL as <literal>concat('md5',
302+
md5(concat(md5(concat(password, username)), random-salt)))</>.
303+
(Keep in mind the <function>md5()</> function returns its
304+
result as a hex string.)
300305
</para>
301306
</listitem>
302307
</varlistentry>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy