Issue with password salting moving from 1.1.3 -> 1.2.0

Added by JC Wren over 6 years ago

I had redmine 1.1.3 nicely running on my system. I saw that 1.2.0 had been released so I upgraded. Now when I try to login, /var/log/production.log has the contents below. I did some Googling and found some references to the addition of the password salt, but I didn't see anything that I interpreted as a solution. I've also run 'rake db:migrate_plugins RAILS_ENV=production'.

Anyone have any advice on how to fix this? I'm basically an end-user for redmine, not a Ruby programmer, so simple explanations would be appreciated :)

# Logfile created on Tue Jun 21 16:55:22 -0400 2011

Processing WelcomeController#index (for 10.11.12.13 at 2011-06-21 16:55:27) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Redirected to http://bugs.xyzzy.com/login?back_url=http%3A%2F%2Fbugs.xyzzy.com%2F
Filter chain halted as [:check_if_login_required] rendered_or_redirected.
Completed in 95ms (DB: 44) | 302 Found [http://bugs.xyzzy.com/]

Processing WelcomeController#index (for 10.11.12.13 at 2011-06-21 16:55:27) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Redirected to http://bugs.xyzzy.com/login?back_url=http%3A%2F%2Fbugs.xyzzy.com%2F
Filter chain halted as [:check_if_login_required] rendered_or_redirected.
Completed in 80ms (DB: 30) | 302 Found [http://bugs.xyzzy.com/]

Processing AccountController#login (for 10.11.12.13 at 2011-06-21 16:55:27) [GET]
  Parameters: {"back_url"=>"http://bugs.xyzzy.com/", "action"=>"login", "controller"=>"account"}
Rendering template within layouts/base
Rendering account/login
Completed in 58ms (View: 39, DB: 6) | 200 OK [http://bugs.xyzzy.com/login?back_url=http%3A%2F%2Fbugs.xyzzy.com%2F]

Processing AccountController#login (for 10.11.12.13 at 2011-06-21 16:55:29) [POST]
  Parameters: {"back_url"=>"http%3A%2F%2Fbugs.xyzzy.com%2F", "action"=>"login", "authenticity_token"=>"TQ2KeZRmKJXgUbhs/ar+sg70shzQN2MyiUze/6bpWus=", "username"=>"xxxxxx", "controller"=>"account", "password"=>"[FILTERED]", "logi
n"=>"Login �"}

NameError (undefined local variable or method `salt' for #<User:0xdeadbeef>):
  app/models/user.rb:220:in `check_password?'
  app/models/user.rb:136: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'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/utils.rb:479:in `safe_fork'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:357:in `__send__'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:180:in `start'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:357:in `__send__'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:99

Rendering /var/lib/redmine/public/500.html (500 Internal Server Error)

Replies (3)

RE: Issue with password salting moving from 1.1.3 -> 1.2.0 - Added by Alfredo Bonilla over 6 years ago

You have to execute the rake db:migrate process (the one for Redmine).

RE: Issue with password salting moving from 1.1.3 -> 1.2.0 - Added by JC Wren over 6 years ago

Ah, that did the trick. Basically, if you don't have a redmine_development database (which I don't), you need both these steps:

rake db:migrate RAILS_ENV=production
rake db:migrate_plugins RAILS_ENV=production

In my searching, I had found the second line which someone seemed to indicate solved the salt login problem. I didn't find or overlooked the first line, which is what it takes to get the new salt field added. Turns out that you also have to tell redmine you forgot your password and have it send you the link to set a new one.

All is well! Thanks for the help.

--jc

(1-3/3)