[Bps-public-commit] r17831 - in RT-Authen-ExternalAuth/trunk: html/Callbacks/ExternalAuth/autohandler lib/RT/Authen lib/RT/Authen/ExternalAuth

zordrak at bestpractical.com zordrak at bestpractical.com
Sun Jan 18 16:38:37 EST 2009


Author: zordrak
Date: Sun Jan 18 16:38:36 2009
New Revision: 17831

Modified:
   RT-Authen-ExternalAuth/trunk/html/Callbacks/ExternalAuth/autohandler/Auth
   RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth.pm
   RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth/DBI/Cookie.pm
   RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth/LDAP.pm

Log:
RT::Authen::ExternalAuth v0.08_01-alpha2 == Second functional release candidate. Only warnings, no failures.

Modified: RT-Authen-ExternalAuth/trunk/html/Callbacks/ExternalAuth/autohandler/Auth
==============================================================================
--- RT-Authen-ExternalAuth/trunk/html/Callbacks/ExternalAuth/autohandler/Auth	(original)
+++ RT-Authen-ExternalAuth/trunk/html/Callbacks/ExternalAuth/autohandler/Auth	Sun Jan 18 16:38:36 2009
@@ -4,12 +4,10 @@
 
 my ($val,$msg);
 unless($session{'CurrentUser'} && $session{'CurrentUser'}->Id) {
-    $RT::Logger->debug("Calling DoAuth with \$user ($user) \$pass ($pass) %session (",Dumper(%session),")");
-    ($val,$msg) = RT::Authen::ExternalAuth::DoAuth(\%session,\$user,\$pass);
+    ($val,$msg) = RT::Authen::ExternalAuth::DoAuth(\%session,$user,$pass);
     $RT::Logger->debug("Autohandler called ExternalAuth. Response: ($val, $msg)");
 }
 
-$RT::Logger->debug("Leaving ExternalAuth autohandler Auth callback. Session:",Dumper(%session));
 return;
 </%init>
 

Modified: RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth.pm
==============================================================================
--- RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth.pm	(original)
+++ RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth.pm	Sun Jan 18 16:38:36 2009
@@ -26,22 +26,12 @@
 use RT::Authen::ExternalAuth::LDAP;
 use RT::Authen::ExternalAuth::DBI;
 
-use Data::Dumper;
-
 use strict;
 use warnings;
 
 sub DoAuth {
     my ($session,$given_user,$given_pass) = @_;
 
-    $RT::Logger->debug("Entering DoAuth. Params == \$given_user (",
-	    		Dumper($given_user),
-			") \$given_pass (",
-			Dumper($given_pass),
-			") \$session (",
-			Dumper($session),
-			")");
-
     # This may be used by single sign-on (SSO) authentication mechanisms for bypassing a password check.
     my $pass_bypass = 0;
     
@@ -98,8 +88,8 @@
 
             # Don't continue unless the $username exists in the external service
 
-	    $RT::Logger->debug("Calling UserExists with \$username ($username) and \$service ($service)");
-            next unless RT::Authen::ExternalAuth::UserExists($username, $service);
+            my $user_exists = RT::Authen::ExternalAuth::UserExists($username,$service);
+	    next unless $user_exists;
         }
 
         ####################################################################
@@ -211,7 +201,6 @@
             # which will in turn call IsExternalPassword
     }
     
-    $RT::Logger->debug("End of ExternalAuth DoAuth. State of \$session:",Dumper($session));
     return (1, "Successful login");
 }
 
@@ -324,7 +313,7 @@
     # Request a username/password check from the specified service
     # This is only valid for non-SSO services.
 
-    my ($service,$username) = @_;
+    my ($username,$service) = @_;
 
     my $success = 0;
 
@@ -453,7 +442,7 @@
             unless(defined($args->{$rt_attr})) {
                 $RT::Logger->debug("This attribute (",
                                     $rt_attr,
-                                    ") is not defined in the attr_match_list for this service (",
+                                    ") is not defined in the attr_match_list for this service, or is null (",
                                     $service,
                                     ")");
                 next;

Modified: RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth/DBI/Cookie.pm
==============================================================================
--- RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth/DBI/Cookie.pm	(original)
+++ RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth/DBI/Cookie.pm	Sun Jan 18 16:38:36 2009
@@ -1,7 +1,6 @@
 package RT::Authen::ExternalAuth::DBI::Cookie;
 
 use CGI::Cookie;
-use Data::Dumper;
 
 use strict;
 use warnings;

Modified: RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth/LDAP.pm
==============================================================================
--- RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth/LDAP.pm	(original)
+++ RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth/LDAP.pm	Sun Jan 18 16:38:36 2009
@@ -3,7 +3,6 @@
 use Net::LDAP qw(LDAP_SUCCESS LDAP_PARTIAL_RESULTS);
 use Net::LDAP::Util qw(ldap_error_name);
 use Net::LDAP::Filter;
-use Data::Dumper;
 
 use strict;
 use warnings;
@@ -179,7 +178,7 @@
         $RT::Logger->debug( "LDAP Filter invalid or not present.");
     }
 
-    unless ($base) {
+    unless (defined($base)) {
         $RT::Logger->critical(  (caller(0))[3],
                                 "No base given");
         # Drop out to the next external information service



More information about the Bps-public-commit mailing list