Skip Menu |

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

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

People
Owner: PLOBBES [...] cpan.org
Requestors: karcher [...] Waisman.Wisc.Edu
Cc:
AdminCc:

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



Subject: getacl on a folder that contains percent sign fails
Date: Tue, 12 Nov 2013 16:28:03 -0600
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Carl Karcher <karcher [...] Waisman.Wisc.Edu>
Version info: karcher@ubuntu:~$ sudo cpan -D Mail::IMAPClient CPAN: Storable loaded ok (v2.27) Going to read '/home/karcher/.local/share/.cpan/Metadata' Database was generated on Tue, 12 Nov 2013 21:08:16 GMT Mail::IMAPClient ------------------------------------------------------------------------- CPAN: Module::CoreList loaded ok (v2.49_02) An IMAP Client API P/PL/PLOBBES/Mail-IMAPClient-3.34.tar.gz /usr/local/share/perl/5.14.2/Mail/IMAPClient.pm Installed: 3.34 CPAN: 3.34 up to date Mark Overmeer (MARKOV) mark@overmeer.net karcher@ubuntu:~$ perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 13.04 Release: 13.04 Codename: raring karcher@ubuntu:~$ Description: When calling the getacl method on a selected folder where the folder name contains a percent sign, getacl fails. Code: # While looping through folders... # select the folder. If we can't, print a warning and go to next folder if ($getacl) { $imap->select($_) or warn "Select '$_' failed: ", $imap->LastError and next; my $acl_hash = $imap->getacl() or die "Getacl for $_ failed: ", $imap->LastError, $imap->Report; Resulting output when folder name is "Contains % sign": INBOX: admin: lrswipcda, testme2: lrswipcda Archives: admin: lrswipcda, testme2: lrswipcda Getacl for Contains % sign failed: 8 GETACL Archives* ACL Archives testme2 lrswipcda admin lrswipcda 8 OK Completed 9 SELECT "Contains % sign"* FLAGS (\Answered \Flagged \Draft \Deleted \Seen) * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)] * 0 EXISTS * 0 RECENT * OK [UIDVALIDITY 1384191623] 9 OK [READ-WRITE] Completed 10 GETACL "Contains % sign"* ACLContains % sign testme2 lrswipcda admin lrswipcda 10 OK Completed Using a telnet session shows OK: 1 OK User logged in 2 getacl "Contains % sign" * ACL {15} Contains % sign testme2 lrswipcda admin lrswipcda 2 OK Completed -- -- Carl Karcher, Computing Services, Waisman Center, UW-Madison -- Web: http://www.waisman.wisc.edu/computing/ phone: 608-263-5896 -- Supervisor: Jody Bleck, bleck@waisman.wisc.edu
Would you be willing to download and try beta code to see if recent changes fix your problem? If so, you can 1. download: http://sourceforge.net/p/mail-imapclient/git/ci/master/tree/lib/Mail/IMAPClient.pm 2. put the new IMAPClient.pm in place of the original (make a backup/copy of the old version) 3. test 4. report results here I didn't test my fix yet on your problem as my test server doesn't have ACLs enabled at the moment, but I think there's a chance this covers the problem you saw. Please let me know if you get a chance to try it out!
Subject: Re: [rt.cpan.org #90315] getacl on a folder that contains percent sign fails
Date: Fri, 22 Nov 2013 11:09:13 -0600
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Carl Karcher <karcher [...] Waisman.Wisc.Edu>
The new IMAPClient.pm fixed it. Thanks! After I reported this I learned that % is not valid character in a folder name per RFC. However, Office 365 does allow it. On 11/22/2013 1:10 AM, Phil Pearl (Lobbes) via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=90315 > > > Would you be willing to download and try beta code to see if recent changes fix your problem? > > If so, you can > 1. download: > http://sourceforge.net/p/mail-imapclient/git/ci/master/tree/lib/Mail/IMAPClient.pm > > 2. put the new IMAPClient.pm in place of the original (make a backup/copy of the old version) > > 3. test > > 4. report results here > > I didn't test my fix yet on your problem as my test server doesn't have ACLs enabled at the moment, but I think there's a chance this covers the problem you saw. Please let me know if you get a chance to try it out!
-- -- Carl Karcher, Computing Services, Waisman Center, UW-Madison -- Web: http://www.waisman.wisc.edu/computing/ phone: 608-263-5896 -- Supervisor: Jody Bleck, bleck@waisman.wisc.edu
On Fri Nov 22 12:10:09 2013, karcher@Waisman.Wisc.Edu wrote: Show quoted text
> The new IMAPClient.pm fixed it. Thanks! > > After I reported this I learned that % is not valid character in a > folder name per RFC. However, Office 365 does allow it.
Well, looking at http://tools.ietf.org/html/rfc3501#section-5.1 I see: ... 3) Although the list-wildcard characters ("%" and "*") are valid in a mailbox name, it is difficult to use such mailbox names with the LIST and LSUB commands due to the conflict with wildcard interpretation. So perhaps not invalid, but perhaps somewhat difficult to deal with. Thanks for filing the bug and testing the fix!
Mail::IMAPClient 3.35 has been released on CPAN and has the fix for this bug. Thanks again for taking the time to report the bug and test!