KEMBAR78
Fix issue with opting out of headers when using header_hash method by oreoshake · Pull Request #193 · github/secure_headers · GitHub
Skip to content

Conversation

@oreoshake
Copy link
Contributor

The header_hash opt-out code was not consistent with the non-header-hash code. Mainly opting out of a header meant you would get an exception:

     NoMethodError:
       undefined method `name' for nil:NilClass
     # ./lib/secure_headers.rb:63:in `block in header_hash'
     # ./lib/secure_headers.rb:54:in `each'
     # ./lib/secure_headers.rb:54:in `inject'
     # ./lib/secure_headers.rb:54:in `header_hash'

I'm going to see if this issue exists on the 3.x branch as well.

/cc @moratorius

oreoshake added a commit that referenced this pull request Dec 3, 2015
Fix issue with opting out of headers when using header_hash method
@oreoshake oreoshake merged commit 6c02a63 into master Dec 3, 2015
@oreoshake oreoshake deleted the calling-name-on-nil-value branch December 3, 2015 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant