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")
}
dgh.Reset()
default:
return errors.New("unexpected content in SCRAM challenge")
case strings.HasPrefix(serverReply, "m="):
return errors.New("SCRAM: server sent reserved 'm' attribute.")
}
}
if scramPlus {