Closed (won't fix)
Project:
LDAP integration
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jul 2008 at 06:25 UTC
Updated:
6 Aug 2011 at 18:44 UTC
Jump to comment: Most recent file
Comments
Comment #1
realityloop commentedMore Information:
If I delete the user and attempt to log in again it works and recreates the user.
If I then grant the newly created user some roles they take effect.
Once I log out, I can't log back in.
Comment #2
dwarner commentedConfirmed here as well; I traced my authentication path to ensure it returns 'true' from my hook_auth() implementation.
The code for my auth module can be found here:
http://www.mozdev.org/source/browse/custom/src/drupal/mozdevauth/
Comment #3
dwarner commentedWhoops; didn't realize this was on the ldap project. This should probably be moved to the drupal project.
Comment #4
dwarner commentedAttached is a patch that restores access for me.
Comment #5
dwarner commentedIt appears that revision 1.745.2.27 (issue#165642) according to the commit log was the culprit.
Comment #6
dwarner commentedThat's revision 1.745.2.27 of user.module in the DRUPAL-5 branch.
Comment #7
damien tournoud commentedI guess you are trying to authenticate without using a "@server" part.
There is nothing wrong in the Drupal Core code here, it is the way it should be. It looks like LDAP Integration uses several unsupported hacks to change the behavior of Drupal Core authentication, and those may rely on previously broken behavior of the
user_authenticate()function.I'm reassigning that issue to LDAP Integration for further study.
Comment #8
appel commentedSame problem, but the patch didn't work here.
Comment #9
dwarner commentedThis looks like it's supposed to be a valid execution path; it was certainly one up until Drupal 5.8. Why would you try to auth against each module and then throw away the result if you find a matching user?
Comment #10
damien tournoud commentedWell, I quickly looked at the LDAP integration code from the CVS, there is a whole section there named
4. Login process hacks, that seems to completely bypassuser_authenticate()(by calling_ldapauth_user_authenticate()).This is obviously completely unsupported, and that's why I reassigned that issue to the LDAP integration queue.
@silfreed: it looks like your issue is a different one. The loop through auth modules is meant for registering new users, not for authenticating existing ones that should already be in the authmap. Your issue is you are trying to perform a remote authentication without a proper server part, while that's not properly supported. Please open a new ticket against Drupal core for that.
Comment #11
cpugeniusmv commentedI don't have a CVS working copy here with me, but here's my solution:
Definitely a hack, but so is the rest of the module. It sorely needs a rewrite.
Comment #12
cpugeniusmv commentedComment #13
dwarner commented@Damien the hook_auth() API documentation doesn't make it sound like @server should be required for an external auth hook to be called, and indeed that is how I'm using it. With the modifications made to drupal 5.8 I'm going to have to resort to hacks just like the ldap auth module is forced to. Regardless of whether this was a bug or not, it now affects functionality that was depended upon by several API users.
Comment #14
dwarner commentedI didn't mean to change those values.
Comment #15
realityloop commented#11 worked for me
I've created a patch file against 5.x-1.x-dev
Comment #16
damien tournoud commented@realityloop: this solution is wrong:
_ldapauth_save_user()is already there to deal with login and registering the user.Could you check if
ldapauth_login_validate()is even called on your installation?Comment #17
cpugeniusmv commentedAfter playing around a bit more, I can log in via LDAP just fine with the current 5.x-1.x-dev version and Drupal 5.8.
I threw a
drupal_set_message()intoldapauth_login_validate()and it is running.Comment #18
realityloop commentedI just created a patch from #11 post..
What method should we be using?
Comment #19
cpugeniusmv commentedHe means this:
Which is better than the previous patch. I didn't see that function during my first skim through the code.
But as I said in my last post, my site seems to be authenticating LDAP users without any changes to 5.x-1.x-dev. I'm not sure that this is actually a problem with the module.
Comment #20
realityloop commentedcpugeniusmv: Thanks I've changed over to the method you posted in #19, and it's working, The issues some of us are experiencing may be related to different brands of ldap repository, mine is a Sun ONE Directory Server..
Comment #21
realityloop commentedUpdated patch using method from #19
On further testing this doesn't work on my system (error: User already exists), reverted to #11
Comment #22
tm commentedThanks, folks. The patch at #11 works for me; authenticating against MS Active Directory, pre-existing users. #19 also worked, btw.
Ver 5.x-1.3
Oddly, have another site on the same host (not using multi-site) that works fine with the existing code. Rather mystifying.
Comment #23
johnbarclay commentedClosing 5.x issues to clean out issue queue.