aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2021-08-26 23:53:14 +0200
committerMatthias Andree <matthias.andree@gmx.de>2021-08-26 23:53:14 +0200
commitf5644ba244b0db009e07eb6a94cae8c7d9846a79 (patch)
treea74a6a15ff4f5ad3eb87604748f840f687305c05
parenta0b9f2fb512ba61a058ed1c10f330900df911bbb (diff)
downloadfetchmail-f5644ba244b0db009e07eb6a94cae8c7d9846a79.tar.gz
fetchmail-f5644ba244b0db009e07eb6a94cae8c7d9846a79.tar.bz2
fetchmail-f5644ba244b0db009e07eb6a94cae8c7d9846a79.zip
POP3: make CAPA parser caseblind.
-rw-r--r--NEWS1
-rw-r--r--pop3.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index cf955bbe..8afb8e70 100644
--- a/NEWS
+++ b/NEWS
@@ -124,6 +124,7 @@ fetchmail-6.4.22 (not yet released):
--plugout "".
* Fetchmail no longer leaks memory when processing the arguments of --plugin or
--plugout on connections.
+* On POP3 connections, the CAPAbilities parser is now caseblind.
# CHANGES:
* IMAP: When fetchmail is in not-authenticated state and the server volunteers
diff --git a/pop3.c b/pop3.c
index 430ff8d7..4dfbd3b1 100644
--- a/pop3.c
+++ b/pop3.c
@@ -222,6 +222,7 @@ static int capa_probe(int sock)
if (ok == PS_SUCCESS)
{
char buffer[64];
+ char *cp;
/* determine what authentication methods we have available */
while ((ok = gen_recv(sock, buffer, sizeof(buffer))) == 0)
@@ -229,6 +230,8 @@ static int capa_probe(int sock)
if (DOTLINE(buffer))
break;
+ for (cp = buffer; *cp; cp++) *cp = toupper((unsigned char)*cp);
+
#ifdef SSL_ENABLE
if (strstr(buffer, "STLS"))
has_stls = TRUE;