Skip to content

Commit 3cf1fdd

Browse files
committed
Remove unnecesary line. Add explanation of the HashWithIndifferentAccess issue
1 parent 83a02bc commit 3cf1fdd

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

lib/onelogin/ruby-saml/authrequest.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ def create(settings, params = {})
2727
end
2828

2929
def create_params(settings, params={})
30-
params = {} if params.nil?
31-
# Some ruby-saml versions uses :RelayState others use 'RelayState'
30+
# The method expects :RelayState but sometimes we get 'RelayState' instead.
31+
# Based on the HashWithIndifferentAccess value in Rails we could experience
32+
# conflicts so this line will solve them.
3233
relay_state = params[:RelayState] || params['RelayState']
3334

3435
request_doc = create_authentication_xml_doc(settings)

lib/onelogin/ruby-saml/logoutrequest.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ def create(settings, params={})
2525
end
2626

2727
def create_params(settings, params={})
28-
params = {} if params.nil?
29-
# Some ruby-saml versions uses :RelayState others use 'RelayState'
28+
# The method expects :RelayState but sometimes we get 'RelayState' instead.
29+
# Based on the HashWithIndifferentAccess value in Rails we could experience
30+
# conflicts so this line will solve them.
3031
relay_state = params[:RelayState] || params['RelayState']
3132

3233
request_doc = create_logout_request_xml_doc(settings)

lib/onelogin/ruby-saml/slo_logoutresponse.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def create(settings, request_id = nil, logout_message = nil, params = {})
2626
end
2727

2828
def create_params(settings, request_id = nil, logout_message = nil, params = {})
29-
params = {} if params.nil?
3029
# Some ruby-saml versions uses :RelayState others use 'RelayState'
3130
relay_state = params[:RelayState] || params['RelayState']
3231

0 commit comments

Comments
 (0)