aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1999-10-26 18:39:04 +0000
committerEric S. Raymond <esr@thyrsus.com>1999-10-26 18:39:04 +0000
commit265027a7c122ab9992ca9e6c9a42dd9b93f4944b (patch)
treed8eb41df76f8aa013cdc71bacbbefcde162168ed /imap.c
parentb5d9871e38e2bee9283beb475f9a7e2679954f67 (diff)
downloadfetchmail-265027a7c122ab9992ca9e6c9a42dd9b93f4944b.tar.gz
fetchmail-265027a7c122ab9992ca9e6c9a42dd9b93f4944b.tar.bz2
fetchmail-265027a7c122ab9992ca9e6c9a42dd9b93f4944b.zip
Backed oup username quoting.
svn path=/trunk/; revision=2641
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/imap.c b/imap.c
index 1c7d1fe8..19defbc9 100644
--- a/imap.c
+++ b/imap.c
@@ -749,7 +749,6 @@ static int do_cram_md5 (int sock, struct query *ctl)
{
int result;
int len;
- int quot;
unsigned char buf1[1024];
unsigned char msg_id[768];
unsigned char response[16];
@@ -787,28 +786,19 @@ static int do_cram_md5 (int sock, struct query *ctl)
* computed by applying the keyed MD5 algorithm from [KEYED-MD5] where
* the key is a shared secret and the digested text is the timestamp
* (including angle-brackets).
- *
- * If the usename has a space in it, it's surrounded by string quotes
- * before being shipped. This is not in conformance with the CRAM-MD5
- * RFCs (which don't describe any kind of quoting and imply that the
- * username must be a single token), but at least one server accepts
- * it anyway (the greeting line says "InterChange IMAP4 Server v3.51.06").
- * If this doesn't work, sending the unquoted name wouldn't have worked
- * either, so we lost nothing.
*/
hmac_md5 (ctl->password, strlen (ctl->password),
msg_id, strlen (msg_id),
response, sizeof (response));
- quot = (int) strpbrk (ctl->remotename, " ");
#ifdef HAVE_SNPRINTF
snprintf (reply, sizeof (reply),
#else
sprintf(reply,
#endif
- "%s%s%s %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
- quot ? "\"" : "", ctl->remotename, quot ? "\"" : "",
+ "%s %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ ctl->remotename,
response[0], response[1], response[2], response[3],
response[4], response[5], response[6], response[7],
response[8], response[9], response[10], response[11],
@@ -1268,8 +1258,8 @@ static int imap_trail(int sock, struct query *ctl, int number)
: "STORE %d +FLAGS (\\Seen)",
number)))
return(ok);
- }
#endif /* __UNUSED__ */
+ }
return(PS_SUCCESS);
}