forked from jshiffer/go-xmpp
Add missing error handling.
This commit is contained in:
parent
6c9243326e
commit
3462085098
3
xmpp.go
3
xmpp.go
@ -535,6 +535,9 @@ func (c *Client) init(o *Options) error {
|
||||
}
|
||||
case strings.HasPrefix(serverReply, "s="):
|
||||
salt, err = base64.StdEncoding.DecodeString(strings.SplitN(serverReply, "=", 2)[1])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if string(salt) == "" {
|
||||
return errors.New("SCRAM: server sent empty salt")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user