Skip Menu |

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

Report information
The Basics
Id: 66860
Status: rejected
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: PLOBBES [...] cpan.org
Requestors: jason [...] long.name
Cc:
AdminCc:

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



Subject: Return value of folders() is already-massaged folder name
I have a user with a folder named '20% discount'. When I call folders() on this user's mailbox, I get an array containing an element like this: '20\% discount' When I then use that string as is with select(), I get an error. Is there a method I should call to unescape the folder name before giving it to select(), or is this a bug in the client or server?
There isn't enough info here to know where the bug lies for sure. A good test case and data are called for. Based on my test I would guess this is a server bug. Here's my test code: #!/usr/bin/perl use warnings; use strict; use Data::Dumper qw(Dumper); use Mail::IMAPClient (); my $imap = Mail::IMAPClient->new( server => 'my.server', User => 'myuser', Password => 'mypass', Debug => 1, ) or die("error connecting to server: $@"); my $folder = '20% discount'; #$imap->create($folder) or die("create '$folder': $@\n"); $imap->select($folder) or die("select '$folder': $@\n"); my $folders = $imap->folders; print "folders: ", Dumper($folders); #$imap->delete($folder) or die("delete '$folder': $@\n"); In my case I used an empty mailbox so I created and deleted the mailbox (code commented out above). In the debug output I see: Sending: 2 CREATE "20% discount" Sent 25 bytes Read: 2 OK Create completed. Sending: 3 SELECT "20% discount" Sent 25 bytes ... Sending: 4 LIST "" * Sent 13 bytes Read: * LIST (\NoInferiors \UnMarked) "/" "afolder" ... * LIST (\NoInferiors \UnMarked) "/" "20% discount" ... * LIST (\NoInferiors \UnMarked) "/" "INBOX" 4 OK List completed. Notice the server doesn't escape the '%'. In RFC3501 I don't see why a server would/should escape a '%', I see: quoted-specials = DQUOTE / "\" That's it. Marking this bug as rejected for now.
Subject: Re: [rt.cpan.org #66860] Return value of folders() is already-massaged folder name
Date: Thu, 24 Mar 2011 17:06:13 -0400
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Jason Long <jason [...] long.name>
Thanks for testing that. This is proof enough for me. It wouldn't be the first IMAP protocol bug I've seen on my email server. Jason
- reclosing as rejected