Skip to content

Commit

Permalink
coerce new_registration to t/f; protect against partial but invalid r…
Browse files Browse the repository at this point in the history
…px response
  • Loading branch information
tardate committed Jan 3, 2010
1 parent 20ac028 commit 15c5977
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/authlogic_rpx/session.rb
Expand Up @@ -70,7 +70,7 @@ def self.included(klass)
# For use in the session controller to help direct the most appropriate action to follow.
#
def new_registration?
new_registration
new_registration ||= false
end

# Determines if the authenticated user has a complete registration (no validation errors)
Expand Down Expand Up @@ -138,7 +138,7 @@ def validate_by_rpx
:extended => rpx_extended_info?) { |raw| raw }

# If we don't have a valid sign-in, give-up at this point
if @rpx_data.nil?
if @rpx_data.nil? || @rpx_data['profile'].nil?
errors.add_to_base("Authentication failed. Please try again.")
return false
end
Expand Down

0 comments on commit 15c5977

Please sign in to comment.