Defect #4918

Revisions r3453 and r3454 broke On-the-fly user creation with LDAP

Added by Jack Kurzecki over 7 years ago. Updated over 3 years ago.

Status:ClosedStart date:2010-02-23
Priority:NormalDue date:
Assignee:Eric Davis% Done:

100%

Category:LDAP
Target version:1.0.0 (RC)
Resolution:Fixed Affected version:

Description

Revisions r3453 and r3454 broke On-the-fly user creation with LDAP

When attempting to enter a valid username and password for a user existing in AD, but not in Redmine I'm getting the following error (production.log):

Processing AccountController#login (for 192.168.0.100 at 2010-02-23 13:00:27) [POST]
  Parameters: {"back_url"=>"http%3A%2F%2Flocalhost", "action"=>"login", "authenticity_token"=>"cBCdZZoPF6hXV2QeqgVcd/BKAkYH9laBDjRKdSSSA10=", "username"=>"user1", "controller"=>"account", "password"=>"[FILTERED]", "login"=>"Login ยป"}

ActiveRecord::UnknownAttributeError (unknown attribute: dn):
  app/models/user.rb:114:in `new'
  app/models/user.rb:114:in `try_to_login'
  app/controllers/account_controller.rb:140:in `password_authentication'
  app/controllers/account_controller.rb:35:in `login'

Rendering C:/webserver/railsapps/redmine/public/500.html (500 Internal Server Error)

Reverting only app\models\auth_source_ldap.rb to r3452 fixes the issue and user gets created in Redmine.

Associated revisions

Revision 3485
Added by Eric Davis over 7 years ago

Fix LDAP on the fly creation. The User object doesn't have a :dn attribute.

Fixes #4918 and adds a test for the behavior.

History

#1 Updated by Tim Perkins over 7 years ago

I'm running into this exact same issue too.

#2 Updated by Jean-Philippe Lang over 7 years ago

  • Assignee set to Eric Davis

#3 Updated by Eric Davis over 7 years ago

  • Status changed from New to 7

I'll fix this. It's odd that the tests didn't catch it.

#4 Updated by Eric Davis over 7 years ago

  • Status changed from 7 to Closed
  • Target version set to 1.0.0 (RC)
  • % Done changed from 0 to 100
  • Resolution set to Fixed

I've fixed this in r3485 and also included the unit test that I thought existed already (it was on a client's branch only). Sorry about introducing the bug.

#5 Updated by Adriano Machado over 3 years ago

I'm working with redmine 2.5.1 and I'm getting this erros with valid accounts. Some accounts are created, but others aren't.

#6 Updated by Toshi MARUYAMA over 3 years ago

Adriano Machado wrote:

I'm working with redmine 2.5.1 and I'm getting this erros with valid accounts. Some accounts are created, but others aren't.

Do not post closed issue with target version.
Please post to forum or create issue with more details.

Also available in: Atom PDF