Skip to content

Commit 1564865

Browse files
committed
ensure case-insensitive comparison for IDLE termination
1 parent 72c6f79 commit 1564865

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

imap/idle.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package imap
33
import (
44
"io"
55
"net/textproto"
6+
"strings"
67
)
78

89
type UpdateWriter interface {
@@ -39,7 +40,7 @@ func (c *conn) handleIdle(tag string) error {
3940
return err
4041
}
4142

42-
if line != "DONE" {
43+
if strings.ToUpper(line) != "DONE" {
4344
return c.writeResponse(tag, &response{
4445
status: bad,
4546
text: "Expected DONE to end IDLE",

0 commit comments

Comments
 (0)