New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue that fails if secrets.yml is an empty file. #1254

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@naokikimura
Copy link
Contributor

naokikimura commented Aug 29, 2018

If config/secrets.yml is an empty file, the following error occurs:

== Errors ==

Error: undefined method `[]' for false:FalseClass
Location: /usr/local/opt/asdf/installs/ruby/2.3.7/lib/ruby/gems/2.3.0/gems/brakeman-4.3.1/lib/brakeman/checks/check_session_settings.rb:127:in `check_secrets_yaml'

@presidentbeef

This comment has been minimized.

Copy link
Owner

presidentbeef commented Aug 29, 2018

Hi @naokikimura! Thank you for this contribution.

Can you add an empty secrets.yml to one of the test applications to cover this scenario?

@naokikimura

This comment has been minimized.

Copy link
Contributor Author

naokikimura commented Aug 30, 2018

Hi @presidentbeef.

Added test covering the scenario.

@presidentbeef

This comment has been minimized.

Copy link
Owner

presidentbeef commented Sep 21, 2018

Hi @naokikimura, thank you for this contribution. A full new test app was a bit much just to test an empty secrets.yml (sorry for the confusion). I added an empty secrets.yml to the Rails 5.2 test app and merged your fix.

Thank you again!

Repository owner locked and limited conversation to collaborators Oct 16, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.