totoroliu/open-build-service — comment on commit 5a65582e7315ab8ca1a3bf5cb49f37dbb08273ba
File:  line 0
By totoroliu:

My mistake for previous post~
The test in previous post is before pull your changes from commit 0d25aa6.

I just did another test after pulling your changes from commit 0d25aa6,
but there's still one error.

Precondition:
OBS database api_production.users table has only 2 default entries (Admin and _nobody_).
/srv/www/obs/api/config/environments/production.rb
LDAP_MODE = :on
/srv/www/obs/api/config/options.yml
new_user_registration: deny

Test:
I log-in using my ldap username/password (rickliu).

Result:
Browser URL:
http://lbrmn-rickliu/user/do_login

Browser content:
OBS Web Interface Error:
Error Details:
Errorcode: unknown
Message: Uncaught exception: undefined local variable or method `errstr' for #

PS.
On the top-right corner,
it shows "rickliu | Home Project | Log Out",
so it seems I still got log-in,
but end up in some error state.

/srv/www/obs/api/log/production.log
[INFO |# 4747] Processing PersonController#userinfo (for 127.0.0.1 at 2011-11-25 10:33:43) [GET]
[INFO |# 4747] Parameters: {"login"=>"rickliu"}
[DEBUG|# 4747] Validate XML request: #
[DEBUG|# 4747] no schema found, skipping validation for methodgetactionuserinfotyperequestcontrollerpersonloginrickliu
[DEBUG|# 4747] AUTH: ["Basic", "cmlja2xpdTpZcjY5MTIxNSM4"]
[DEBUG|# 4747] Using LDAP to find rickliu
[DEBUG|# 4747] Looking for rickliu using ldap
[DEBUG|# 4747] Cache read: ldap_cache_userpasswd:rickliu
[DEBUG|# 4747] Connecting to nt-rmna-0002 as 'CN=rickliu,CN=Users,DC=corp,DC=ad,DC=broadcom,DC=com'
[DEBUG|# 4747] Bound as CN=rickliu,CN=Users,DC=corp,DC=ad,DC=broadcom,DC=com
[DEBUG|# 4747] Search for (cn=rickliu)
[DEBUG|# 4747] Connecting to nt-rmna-0002 as 'CN=rickliu,CN=Users,DC=corp,DC=ad,DC=broadcom,DC=com'
[DEBUG|# 4747] Bound as CN=rickliu,CN=Users,DC=corp,DC=ad,DC=broadcom,DC=com
[DEBUG|# 4747] login success for checking with ldap server
[DEBUG|# 4747] User Columns (0.5ms) SHOW FIELDS FROM `users`
[DEBUG|# 4747] User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`login` = 'rickliu') LIMIT 1
[DEBUG|# 4747] No user found in database, creation disabled

[FATAL|# 4747] NameError (undefined local variable or method `errstr' for #):
app/controllers/application_controller.rb:246:in `extract_user'
passenger (3.0.9) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
passenger (3.0.9) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
passenger (3.0.9) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
passenger (3.0.9) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
passenger (3.0.9) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
passenger (3.0.9) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
passenger (3.0.9) lib/phusion_passenger/utils.rb:479:in `safe_fork'
passenger (3.0.9) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:180:in `start'
passenger (3.0.9) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
passenger (3.0.9) lib/phusion_passenger/classic_rails/framework_spawner.rb:268:in `handle_spawn_application'
passenger (3.0.9) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
passenger (3.0.9) lib/phusion_passenger/classic_rails/framework_spawner.rb:263:in `handle_spawn_application'
passenger (3.0.9) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
passenger (3.0.9) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (3.0.9) lib/phusion_passenger/classic_rails/framework_spawner.rb:261:in `handle_spawn_application'
passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:180:in `start'
passenger (3.0.9) lib/phusion_passenger/classic_rails/framework_spawner.rb:93:in `start'
passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
passenger (3.0.9) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
passenger (3.0.9) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
passenger (3.0.9) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.9) helper-scripts/passenger-spawn-server:99

[INFO |# 4747] Rendering status
[INFO |# 4747] errorcode 'unknown' - Uncaught exception: undefined local variable or method `errstr' for #
[INFO |# 4747] Rendering status (400)