Skip to content
Snippets Groups Projects
Commit 2df9c59c authored by ale's avatar ale
Browse files

Oops, fix logic

parent 875647ea
No related branches found
No related tags found
No related merge requests found
......@@ -123,7 +123,7 @@ func (c *Conn) LoginSASL(username, password string) error {
enc := base64.StdEncoding.EncodeToString(b)
return c.cmd(fmt.Sprintf("AUTHENTICATE PLAIN\r\n%s", enc), func(line string) error {
if strings.TrimSpace(line) != "+" || !strings.HasPrefix(line, "* ") {
if strings.TrimSpace(line) != "+" && !strings.HasPrefix(line, "* ") {
return fmt.Errorf("unexpected IMAP auth response: '%s'", line)
}
return nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment