check for PLAIN should use match[0] not match

This commit is contained in:
jesopo 2020-04-10 21:36:03 +01:00
parent a546a468b7
commit 5da82e7d66

View file

@ -129,7 +129,7 @@ class SASLContext(ServerContext):
elif line.command == "AUTHENTICATE" and line.params[0] == "+":
auth_text = ""
if match == "PLAIN":
if match[0] == "PLAIN":
auth_text = f"{username}\0{username}\0{password}"
elif match[0].startswith("SCRAM-SHA-"):
auth_text = await self._scram(