* Andy Harrison via RT (bug-Mail-IMAPClient@rt.cpan.org) [071128 15:42]:
Show quoted text> Wed Nov 28 10:42:10 2007: Request 31035 was acted upon.
> Transaction: Ticket created by AHARRISON
> Queue: Mail-IMAPClient
> Subject: password quoting
> Broken in: 2.99_01, 2.99_02, 2.99_04, 2.99_05, 2.99_06, 2.99_07
>
> The new login sub does not quote passwords. SO, passwords with spaces,
> for example, now fail because of this.
Ok.
sub login
{ my $self = shift;
my $auth = $self->Authmechanism;
return $self->authenticate($auth, $self->Authcallback)
if $auth ne 'LOGIN';
my $passwd = $self->Password;
+ if($passwd =~ m/\W/) # need to quote
+ { $passwd =~ s/(["\\])/\\$1/g;
+ $passwd = qq{"$passwd"};
+ }
--
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark@Overmeer.net solutions@overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net