Bug fix for IMAP::Admin perl module

Ron Roskens roskens at elfin.net
Thu Dec 19 11:26:50 EST 2002

What you really want is this:

    return unless $d{-text} =~ s/^\"*\Q$mbx\E\"*\s+//;

Using the \Q and \E disables regex expansions between them.

On 19 Dec 2002, Edward Rudd wrote:

> Here's a quick hack to fix a bug with the IMAP::Admin perl module in
> cyrus IMAPD version 2.1.11
> on line 269:
> 	return unless $d{-text} =~ s/^\"*$mbx\"*\s+//;
> the regex causes a perl error with folder names with +s in them. ie "C
> And C++"
> I *hacked it* thusly..
> 	my $tmp = $mbx;
> 	$tmp =~ s/\+/\\++/g;
> 	return unless $d{-text} =~ s/^\"*$tmp\"*\s+//;
> There are probably more regex keywords that need to be escaped, but that
> fixed the immediate problem for me...
> --
> Edward Rudd <eddie at omegaware.com>

More information about the Info-cyrus mailing list