Only panic about a scram failure if it's a server-final-message failure (sasl)

This commit is contained in:
jesopo 2019-02-06 15:38:59 +00:00
parent 0e63700761
commit 09eb3d3314

View file

@ -83,8 +83,10 @@ class Module(ModuleManager.BaseModule):
if verified:
auth_text = "+"
else:
if current_scram.state == scram.SCRAMState.VerifyFailed:
event["server"].disconnect()
raise ValueError("Server SCRAM verification failed")
self._end_sasl(event["server"])
else:
raise ValueError("unknown sasl mechanism '%s'" % mechanism)