summarylogtreecommitdiffstats
path: root/scram.diff
blob: 66a6d016f622ffaf010160a20d5f4441a8135006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/pg8000/core.py b/pg8000/core.py
index 8c4c512..8c544b1 100644
--- a/pg8000/core.py
+++ b/pg8000/core.py
@@ -492,7 +492,7 @@ class CoreConnection():
         elif auth_code == 10:
             # AuthenticationSASL
             mechanisms = [
-                m.decode('ascii') for m in data[4:-1].split(NULL_BYTE)]
+                m.decode('ascii') for m in data[4:-2].split(NULL_BYTE)]
 
             self.auth = ScramClient(
                 mechanisms, self.user.decode('utf8'),