diff options
author | Azul <azul@leap.se> | 2013-03-05 13:35:05 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-03-05 13:35:05 +0100 |
commit | 27c16ccceffa1d8eaaf02612cf29a60bfe6ced01 (patch) | |
tree | 1df9d9900872cf2e97d5c27b4175816eff5cbf80 /users/lib | |
parent | 733426aa3992dafaf1c58ede7e74018057a01148 (diff) | |
parent | 87c306ea212c01ecc8f98009def5971fc4d5af11 (diff) |
Merge branch 'master' into feature/limit_user_leak
Conflicts:
users/lib/warden/strategies/secure_remote_password.rb
Diffstat (limited to 'users/lib')
-rw-r--r-- | users/lib/warden/strategies/secure_remote_password.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/users/lib/warden/strategies/secure_remote_password.rb b/users/lib/warden/strategies/secure_remote_password.rb index 5032914..f1b1a57 100644 --- a/users/lib/warden/strategies/secure_remote_password.rb +++ b/users/lib/warden/strategies/secure_remote_password.rb @@ -25,14 +25,17 @@ module Warden end def validate! - client = session[:handshake].authenticate(params['client_auth'].hex) - if client + if client = validate success!(User.find_by_login(client.username)) else fail!({:login => "invalid_user_pass", :password => "invalid_user_pass"}) end end + def validate + session[:handshake].authenticate(params['client_auth'].hex) + end + def initialize! if user = User.find_by_login(id) client = SRP::Client.new user.username, |