Skip Menu |

This queue is for tickets about the Mail-IMAPClient CPAN distribution.

Report information
The Basics
Id: 36879
Status: resolved
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: Nobody in particular
Requestors: djonas [...] splitretina.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: CRAM-MD5 base64 encode bug
Date: Mon, 16 Jun 2008 16:31:14 -0700
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: David Jonas <djonas [...] splitretina.com>
Long usernames get a carriage return with encode_base64 in CRAM-MD5. Here's a simple patch to fix it. It just adds the second argument to encode_base64. Did it to PLAIN as well, but I didn't test that one. Thanks for the great module! David
--- Mail-IMAPClient-3.08/lib/Mail/IMAPClient.pm 2008-05-26 04:25:39.000000000 -0700 +++ Mail-IMAPClient-3.08-patched/lib/Mail/IMAPClient.pm 2008-06-16 16:17:33.000000000 -0700 @@ -2525,7 +2525,7 @@ { my ($code, $client) = @_; use Digest::HMAC_MD5; my $hmac = Digest::HMAC_MD5::hmac_md5_hex(decode_base64($code), $client->Password); - encode_base64($client->User." ".$hmac); + encode_base64($client->User." ".$hmac,''); }; } elsif($scheme eq 'DIGEST-MD5') @@ -2558,7 +2558,7 @@ { $response ||= sub { my ($code, $client) = @_; encode_base64($client->User . chr(0) . $client->Proxy - . chr(0) . $client->Password); + . chr(0) . $client->Password,''); }; } elsif($scheme eq 'NTLM')
Subject: Re: [rt.cpan.org #36879] CRAM-MD5 base64 encode bug
Date: Fri, 20 Jun 2008 20:56:58 +0200
To: David Jonas via RT <bug-Mail-IMAPClient [...] rt.cpan.org>
From: NLnet webmaster <webmaster [...] nlnet.nl>
* David Jonas via RT (bug-Mail-IMAPClient@rt.cpan.org) [080620 17:49]: Show quoted text
> Fri Jun 20 13:49:41 2008: Request 36879 was acted upon. > Transaction: Ticket created by djonas@splitretina.com > Long usernames get a carriage return with encode_base64 in CRAM-MD5. > Here's a simple patch to fix it.
looks sound. Thanks, will be part of 3.09 -- Regards, MarkOv
fixed in 3.09