Merge pull request #181 from mdosch/scram-improvement

Improve RFC5802 compatibility.
This commit is contained in:
Martin 2024-02-01 13:52:47 +08:00 committed by GitHub
commit d6e9a15f29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -595,8 +595,8 @@ func (c *Client) init(o *Options) error {
return errors.New("SCRAM: downgrade protection hash mismatch") return errors.New("SCRAM: downgrade protection hash mismatch")
} }
dgh.Reset() dgh.Reset()
default: case strings.HasPrefix(serverReply, "m="):
return errors.New("unexpected content in SCRAM challenge") return errors.New("SCRAM: server sent reserved 'm' attribute.")
} }
} }
if scramPlus { if scramPlus {