Project

General

Profile

Actions

Defect #5592

closed

Better error page on LDAP Authentication error

Added by Brandon Bonds almost 14 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
LDAP
Target version:
-
Start date:
2010-05-25
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

Logging in as a non-LDAP user, and testing the LDAP connection, I get Unable to connect (LdapError: no connection to server). But logging in as an LDAP user at the same time results in a 500 error, instead of a "nice" error page.

This is in the server log:

RuntimeError (LdapError: no connection to server):
  app/models/auth_source_ldap.rb:61:in `authenticate'
  app/models/user.rb:105:in `try_to_login'
  app/controllers/account_controller.rb:139:in `password_authentication'
  app/controllers/account_controller.rb:35:in `login'

Rendering C:/Program Files/BitNami RubyStack/apps/redmine/public/500.html (500 Internal Server Error)

Related issues

Related to Redmine - Patch #21137: Rescue network level errors with LDAP authClosedJean-Philippe Lang

Actions
Has duplicate Redmine - Defect #23120: 'Internal error' when LDAP server name not resolvedClosed

Actions
Actions #1

Updated by Felix Schäfer almost 14 years ago

  • Subject changed from LDAP Unavailable/500 Internal Server Error to Better error page on LDAP Authentication error
  • Target version set to 1.0.0 (RC)

We should be able to catch errors on authentication and display a more meaningful error page than an http/500. I've set this to 1.0.0 even though we are in feature freeze, might only get fixed in a subsequent minor though.

Actions #2

Updated by Eric Davis almost 14 years ago

  • Assignee set to Eric Davis
  • Target version deleted (1.0.0 (RC))
  • Resolution set to Cant reproduce

Can someone verify this bug exists on trunk? I added some tests in r3819 but I can't reproduce it. The LDAP code has recently been refactored so it might have fixed this bug at that time.

Actions #3

Updated by Brandon Bonds almost 14 years ago

I just tested this again on trunk build r3826. The problem still shows up.

The easiest way for me to test was to set up good and working LDAP authentication, and then replace the server with something bogus. That reproduced the situation identically to what I mentioned before, except the log error has changed a bit:

RuntimeError (LdapError: no connection to server):
  app/models/auth_source_ldap.rb:43:in `authenticate'
  app/models/user.rb:105:in `try_to_login'
  app/controllers/account_controller.rb:147:in `password_authentication'
  app/controllers/account_controller.rb:142:in `authenticate_user'
  app/controllers/account_controller.rb:30:in `login'

Rendering C:/Program Files/BitNami RubyStack/apps/redmine/public/500.html (500 Internal Server Error)
Actions #4

Updated by Eric Davis over 13 years ago

  • Assignee deleted (Eric Davis)
Actions #5

Updated by Yannick Warnier about 11 years ago

Same problem here. We get 500 errors with no details much quickly than the 20s timeout defined. No way to catch it with debug on, either.

Actions #6

Updated by Toshi MARUYAMA almost 8 years ago

  • Has duplicate Defect #23120: 'Internal error' when LDAP server name not resolved added
Actions #7

Updated by Go MAEDA over 2 years ago

  • Status changed from New to Closed

The issue should have already been fixed in r14808 (#21137).

Actions #8

Updated by Go MAEDA over 2 years ago

  • Related to Patch #21137: Rescue network level errors with LDAP auth added
Actions

Also available in: Atom PDF