Project

General

Profile

Actions

Defect #6196

closed

undefined method `stringify_keys!' for #<Array:...>) when logging in, for some users only

Added by mathew murphy about 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Accounts / authentication
Target version:
-
Start date:
2010-08-23
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Processing AccountController#login (for 9.77.143.183 at 2010-08-23 12:31:54) [POST]                                                                             
  Parameters: {"back_url"=>"[CORRECT MAIN SITE URL, FILTERED]", "action"=>"login", "authenticity_token"=>"vXoesYJBWVTEeKS5gpOL2mQZbsrbi4yNj0WaXcnKYh0=", "username"=>"[CORRECT USERNAME, FILTERED]", "controller"=>"account", "password"=>"[FILTERED]", "login"=>"Login ยป"}                                                        

NoMethodError (undefined method `stringify_keys!' for #<Array:0xb511a87c>):     
  app/models/user.rb:118:in `new'                                               
  app/models/user.rb:118: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'                           
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/rack/request_handler.rb:81:in `process_request'                                                  
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/abstract_request_handler.rb:203:in `main_loop'                                                   
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/railz/application_spawner.rb:340:in `start_request_handler'                                      
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/railz/application_spawner.rb:298:in `handle_spawn_application'                                   
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/utils.rb:181:in `safe_fork'                                                                      
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/railz/application_spawner.rb:296:in `handle_spawn_application'                                   
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/abstract_server.rb:337:in `__send__'                                                             
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/abstract_server.rb:337:in `main_loop'                                                            
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/abstract_server.rb:187:in `start_synchronously'                                                  
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/abstract_server.rb:154:in `start'                                                                
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/railz/application_spawner.rb:192:in `start'                                                      
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/spawn_manager.rb:257:in `spawn_rails_application'                                                
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'                                             
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/spawn_manager.rb:251:in `spawn_rails_application'                                                
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'                                                
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'                                                
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/spawn_manager.rb:250:in `spawn_rails_application'                                                
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/spawn_manager.rb:153:in `spawn_application'                                                      
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/spawn_manager.rb:282:in `handle_spawn_application'                                               
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/abstract_server.rb:337:in `__send__'                                                             
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/abstract_server.rb:337:in `main_loop'                                                            
  /var/lib/gems/1.8/gems/passenger-2.2.2/lib/phusion_passenger/abstract_server.rb:187:in `start_synchronously'     

Weirdly, it works fine for me, but it fails for some other people.

RedMine 1.0.1
ruby 1.8.6 (2007-09-24 patchlevel 111)
Rails 2.3.8
PostgreSQL 8.2.7
Ubuntu 8.10

Actions #1

Updated by mathew murphy about 14 years ago

It looks as though this is caused by my LDAP authentication code returning the attributes using [ :foo => 'bar' ] syntax instead of { :foo => 'bar' }

What isn't clear to me is why the former ever worked...

Actions #2

Updated by Jean-Baptiste Barth about 14 years ago

  • Status changed from New to Closed

Rails 2.3.8 is not supported for the moment. stringify_keys! is part of ActiveSupport::CoreExtensions and may have changed between Rails 2.3.5 and 2.3.8. Can you read requirements and tell us if you see the same problem with supported versions ? I close the issue for the moment, reopen it if you still have problems with those versions.

Actions #3

Updated by mathew murphy about 14 years ago

After changing my code to use curly rather than square brackets for the hash, it works--even with Rails 2.3.8.

Actions

Also available in: Atom PDF