]> Pileus Git - ~andy/fetchmail/commitdiff
Caseblind capability checks.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 9 Sep 2001 09:51:48 +0000 (09:51 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 9 Sep 2001 09:51:48 +0000 (09:51 -0000)
svn path=/trunk/; revision=3456

imap.c

diff --git a/imap.c b/imap.c
index 0874e5519540ee3df70554f682f86e126fa83d39..1849d3998dc1d2783a69a9d692326f3609975cd8 100644 (file)
--- a/imap.c
+++ b/imap.c
@@ -236,10 +236,15 @@ static int imap_getauth(int sock, struct query *ctl, char *greeting)
     capabilities[0] = '\0';
     if ((ok = gen_transact(sock, "CAPABILITY")) == PS_SUCCESS)
     {
+       char    *cp;
+
+       /* capability checks are supposed to be caseblind */
+       for (cp = capabilities; *cp; cp++)
+           *cp = toupper(*cp);
+
        /* UW-IMAP server 10.173 notifies in all caps, but RFC2060 says we
           should expect a response in mixed-case */
-       if (strstr(capabilities, "IMAP4REV1") ||
-           strstr(capabilities, "IMAP4rev1"))
+       if (strstr(capabilities, "IMAP4REV1"))
        {
            imap_version = IMAP4rev1;
            if (outlevel >= O_DEBUG)