Skip to content

Commit

Permalink
fix SASL Authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Jan 26, 2024
1 parent 059ad78 commit d5f7cbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion minipg/pgcore.py
Expand Up @@ -497,7 +497,7 @@ def _process_messages(self, obj):
data = self._read(ln)
assert _bytes_to_bint(data[:4]) == 0
elif auth_method == 10: # SASL
assert data[4:-2].decode('utf-8') == 'SCRAM-SHA-256'
assert b'SCRAM-SHA-256\x00\x00' in data
printable = string.ascii_letters + string.digits + '+/'
client_nonce = ''.join(
printable[random.randrange(0, len(printable))]
Expand Down

0 comments on commit d5f7cbb

Please sign in to comment.