Commit fc162af5d45cc07b14f236799f20ed73cc9e45da

Authored by Victor Costa
1 parent 54a1e6d4

api: fix login from cookie

Showing 1 changed file with 1 additions and 0 deletions   Show diff stats
lib/noosfero/api/session.rb
... ... @@ -45,6 +45,7 @@ module Noosfero
45 45 end
46 46  
47 47 post "/login_from_cookie" do
  48 + return unauthorized! if cookies[:auth_token].blank?
48 49 user = User.where(remember_token: cookies[:auth_token]).first
49 50 return unauthorized! unless user && user.activated?
50 51 @current_user = user
... ...