Permalink
Browse files

Fixes schoolboy error of using an untested _fix_ from an untrusted so…

…urce.
  • Loading branch information...
1 parent 694ef24 commit 14598f4cef50b76340d3310a760c0aa89d6e99a9 @james2m james2m committed Jan 14, 2010
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/authlogic_facebook_connect/session.rb
@@ -116,9 +116,10 @@ def validate_by_facebook_connect
end
def authenticating_with_facebook_connect?
- return false unless controller.respond_to?(:set_facebook_session)
- controller.set_facebook_session
- attempted_record.nil? && errors.empty? && controller.facebook_session
+ if controller.respond_to?(:controller) && controller.controller.respond_to?(:set_facebook_session)
+ controller.set_facebook_session
+ attempted_record.nil? && errors.empty? && controller.facebook_session
+ end
end
private

0 comments on commit 14598f4

Please sign in to comment.