Skip to content

Conversation

@ghbren
Copy link
Contributor

@ghbren ghbren commented Jul 25, 2021

Ignore configs that cannot be parsed as hashes and log.

else
msg = "file_content #{file_content.inspect} is not a hash"
bugsnag_notify(msg)
filtered_data = {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will cover a few additional bases if you move filtered_data = {} to line before the YAML_safe_load. That will help if the safe_load runs into any classes not whitelisted (Disallowed classes). Probably not a big deal not but would future proof the code here.

Rest looks good!

@ghbren ghbren merged commit 709518f into master Jul 27, 2021
@ghbren ghbren deleted the log_bad_config branch July 27, 2021 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants