http basic auth broken in rails 3-2-stable #1554

Closed
masterkain opened this Issue Jan 8, 2012 · 5 comments

Projects

None yet

3 participants

@masterkain
Contributor

HTTP Basic Auth is not working at the moment because of a deprecation in authenticatable.rb:

DEPRECATION WARNING: ActiveSupport::Base64.decode64 is deprecated. Use Base64.decode64 instead. (called from decode_credentials at /Users/kain/.rvm/gems/ruby-1.9.3-p0/bundler/gems/devise-a949f9eca24f/lib/devise/strategies/authenticatable.rb:108)

User Load (0.7ms)  SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`deleted_at` IS NULL AND `accounts`.`type` IN ('User') AND `accounts`.`authentication_token` = 'YldGemRHVnlhMkZwYmtCbmJXRnBiQzVqYjIwNmRtbHpkV0ZzYVhwbA==\n' LIMIT 1

Replacing this line with Base64.decode64($1).split(/:/, 2)makes it work again.

morgler commented Jan 9, 2012

Thanks, I was struggling with this for days!

Collaborator

I'm working in this issue.

@rafaelfranca rafaelfranca was assigned Jan 9, 2012
@rafaelfranca rafaelfranca added a commit that closed this issue Jan 9, 2012
@rafaelfranca Rafael Mendonça França + rafaelfranca Do not use deprecated ActiveSupport::Base64. Closes #1554 9549a32
Collaborator

Fixed at master

morgler commented Jan 12, 2012

fantastic! thank you!

Contributor

I think the problem was this: rails/rails@44319ef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment