Skip to content
This repository

fixes issues #260 #295

Merged
merged 1 commit into from over 2 years ago

5 participants

Stephen Prater Parker Moore Chris Ledet Ben Turner Binary Logic
Stephen Prater

Trying to rw_config a nil value where the default_value is also nil ( for instance, using omniauth and not using "login" or "password" credentials) will give raise a Stack Too Deep exception.

Patch simply checks if the default_value is nil, and if so leaves the key empty in config (which will return nil anyway.)

Parker Moore

+1 +1 +1

Binary Logic binarylogic merged commit c2c5c98 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Dec 29, 2011
Stephen Prater stephenprater fixes issues #260 41eba3d
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 lib/authlogic/session/foundation.rb
4 lib/authlogic/session/foundation.rb
@@ -19,7 +19,7 @@ module ClassMethods
19 19 def rw_config(key, value, default_value = nil, read_value = nil)
20 20 if value == read_value
21 21 return acts_as_authentic_config[key] if acts_as_authentic_config.include?(key)
22   - rw_config(key, default_value)
  22 + rw_config(key, default_value) unless default_value.nil?
23 23 else
24 24 config = acts_as_authentic_config.clone
25 25 config[key] = value
@@ -74,4 +74,4 @@ def build_key(last_part)
74 74 end
75 75 end
76 76 end
77   -end
  77 +end

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.