vtiger Forum Index vtiger
The Honest Open Source CRM
 

Thunderbird plugin not working with LDAP auth turned on
Click here to go to the original topic

 
       vtiger Forum Index -> Thunderbird Extension
Previous topic :: Next topic  
Author Message
warmbowski



Joined: 20 Aug 2007
Posts: 4

Posted: Mon Aug 20, 2007 10:26 pm    Post subject: Thunderbird plugin not working with LDAP auth turned on  

When I enable ldap (active directory) authentication, I can log in just fine via the web interface, but the Thunderbird extension no longer logs in. I looked at the soap api for the Thunderbird Extension (thunderbirdplugin.php) and it looks as though it is hard coded to look at the database when authenticating user's passwords.

I was wondering if someone out there has a fix for the api to make it look up the password in Active Directory. So that I can have LDAP and the plugin.


vTiger 5.0.3
Apache 2.x
PHP 5.1.6
centos
Back to top  
ega



Joined: 28 Aug 2007
Posts: 1

Posted: Tue Aug 28, 2007 3:15 pm    Post subject: Re: Thunderbird plugin not working with LDAP auth turned on  

I have the same problem.

The problem is in this file : soap/thunderbirdplugin.php
The authentification is only using SQL method.

Apply this patch for using only LDAP authentification method (no warrenty ...) :

Code: --- soap/thunderbirdplugin.php.old      2007-08-28 16:24:45.000000000 +0200
+++ soap/thunderbirdplugin.php  2007-08-28 16:27:50.000000000 +0200
@@ -500,12 +500,11 @@
        if($password != "" && $user_name != '')
        {
                $objuser->column_fields['user_name'] = $user_name;
-               $encrypted_password = $objuser->encrypt_password($password);
+               require_once('modules/Users/authTypes/LDAP.php');
                if($objuser->load_user($password) && $objuser->is_authenticated())
                {
-                       $query = "select id from vtiger_users where user_name='$user_name' and user_password='$encrypted_password'";
-                       $result = $adb->query($query);
-                       if($adb->num_rows($result) > 0)
+                       $result = ldapAuthenticate($objuser->column_fields["user_name"], $password);
+                       if($result != NULL)
                        {
                                $return_access = 'TRUES';
                                $log->debug("Logged in sucessfully from thunderbirdplugin");

All seems to works good from now.

Regards.
Back to top  
warmbowski



Joined: 20 Aug 2007
Posts: 4

Posted: Tue Aug 28, 2007 6:45 pm    Post subject: Re: Thunderbird plugin not working with LDAP auth turned on  

Thanks, I'll try that.
Back to top  
 
       vtiger Forum Index -> Thunderbird Extension
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group