[Bps-public-commit] r9726 - in Net-IMAP-Server: lib/Net/IMAP/Server/Command

alexmv at bestpractical.com alexmv at bestpractical.com
Wed Nov 21 17:19:05 EST 2007


Author: alexmv
Date: Wed Nov 21 17:19:05 2007
New Revision: 9726

Modified:
   Net-IMAP-Server/   (props changed)
   Net-IMAP-Server/lib/Net/IMAP/Server/Command/Authenticate.pm

Log:
 r25060 at zoq-fot-pik:  chmrr | 2007-11-21 17:17:44 -0500
  * Some auths send the first line of data with the AUTHENTICATE
    command (?)


Modified: Net-IMAP-Server/lib/Net/IMAP/Server/Command/Authenticate.pm
==============================================================================
--- Net-IMAP-Server/lib/Net/IMAP/Server/Command/Authenticate.pm	(original)
+++ Net-IMAP-Server/lib/Net/IMAP/Server/Command/Authenticate.pm	Wed Nov 21 17:19:05 2007
@@ -16,10 +16,10 @@
 
     my @options = $self->parsed_options;
     return $self->bad_command("Not enough options") if @options < 1;
-    return $self->bad_command("Too many options") if @options > 1;
+    return $self->bad_command("Too many options") if @options > 2;
 
     return $self->no_command("Login is disabled")
-      unless $self->connection->capability =~ /\bAUTH=@options\b/i;
+      unless $self->connection->capability =~ /\bAUTH=$options[0]\b/i;
 
     return 1;
 }
@@ -27,7 +27,7 @@
 sub run {
     my $self = shift;
 
-    my($type) = $self->parsed_options;
+    my($type, $arg) = $self->parsed_options;
     $self->server->auth_class->require || warn $@;
     my $auth = $self->server->auth_class->new;
     if ( $auth->provides_sasl( uc $type ) ) {
@@ -35,7 +35,7 @@
         $self->sasl( $auth->$type() );
         $self->pending_auth($auth);
         $self->connection->pending(sub {$self->continue(@_)});
-        $self->continue("");
+        $self->continue( $arg || "");
     } else {
         $self->bad_command("Invalid login");
     }



More information about the Bps-public-commit mailing list