[otrs-cvs] otrs/Kernel/cpan-lib/Net/IMAP Simple.pm,1.9,1.10

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs/Kernel/cpan-lib/Net/IMAP
In directory lancelot:/tmp/cvs-serv17233/Kernel/cpan-lib/Net/IMAP

Modified Files:
	Simple.pm 
Log Message:
REALLY updated CPAN module Net::IMAP::Simple to version 1.2034.

Author: mb

Index: Simple.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/cpan-lib/Net/IMAP/Simple.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -2 -u -d -r1.9 -r1.10
--- Simple.pm	15 Mar 2012 19:13:55 -0000	1.9
+++ Simple.pm	4 Jan 2013 19:04:50 -0000	1.10
@@ -10,5 +10,5 @@
 use Net::IMAP::Simple::PipeSocket;
 
-our $VERSION = "1.2030";
+our $VERSION = "1.2034";
 
 BEGIN {
@@ -38,4 +38,9 @@
     }
 
+    if( $opts{ssl_version} ) {
+        $self->{ssl_version} = $opts{ssl_version};
+        $opts{use_ssl} = 1;
+    }
+
     if( $opts{use_ssl} ) {
         eval {
@@ -147,7 +152,9 @@
 
     if( $self->{cmd} ) {
+        $self->_debug( caller, __LINE__, '_connect', "popping open a pipesocket for command: $self->{cmd}" ) if $self->{debug};
         $sock = Net::IMAP::Simple::PipeSocket->new(cmd=>$self->{cmd});
 
     } else {
+        $self->_debug( caller, __LINE__, '_connect', "connecting to $self->{server}:$self->{port}" ) if $self->{debug};
         $sock = $self->_sock_from->new(
             PeerAddr => $self->{server},
@@ -155,8 +162,10 @@
             Timeout  => $self->{timeout},
             Proto    => 'tcp',
-            ( $self->{bindaddr} ? ( LocalAddr => $self->{bindaddr} ) : () )
+            ( $self->{bindaddr} ? ( LocalAddr => $self->{bindaddr} ) : () ),
+            ( $_[0]->{ssl_version} ? (SSL_version => $self->{ssl_version}) : ()),
         );
     }
 
+    $self->_debug( caller, __LINE__, '_connect', "connected, returning socket" ) if $self->{debug};
     return $sock;
 }
@@ -189,5 +198,5 @@
             my $startres = IO::Socket::SSL->start_SSL(
                 $self->{sock},
-                SSL_version        => "SSLv3 TLSv1",
+                SSL_version        => $self->{ssl_version} || "SSLv3 TLSv1",
                 SSL_startHandshake => 0,
             );
@@ -208,6 +217,8 @@
     my ( $self, $user, $pass ) = @_;
 
+    $pass = _escape($pass);
+
     return $self->_process_cmd(
-        cmd     => [ LOGIN => qq[$user "$pass"] ],
+        cmd     => [ LOGIN => qq[$user $pass] ],
         final   => sub { 1 },
         process => sub { },
@@ -643,5 +654,5 @@
             # NOTE: There is not supposed to be an error if you ask for a
             # message that's not there, but this is a rather confusing
-            # notion … so we generate an error here.
+            # notion É so we generate an error here.
 
             $self->{_errstr} = "message not found";
@@ -649,8 +660,8 @@
         },
         process => sub {
-            if ( $_[0] =~ /^\*\s+\d+\s+FETCH\s+\(.+?\{(\d+)\}\E/ ) {
+            if ( $_[0] =~ /^\*\s+\d+\s+FETCH\s+\(.+?\{(\d+)\}/ ) {
                 $fetching = $1;
 
-            } elsif( $_[0] =~ /^\*\s+\d+\s+FETCH\s+\(.+?\"(.*)\"\s*\)\E/ ) {
+            } elsif( $_[0] =~ /^\*\s+\d+\s+FETCH\s+\(.+?\"(.*)\"\s*\)/ ) {
                 # XXX: this is not tested because Net::IMAP::Server doesn't do
                 # this type of string result (that I know of) for this it might

---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.