Skip to content
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

Use unsafe_load when loading config to support aliases with psych 4 #810

Merged
merged 1 commit into from
Aug 4, 2021

Conversation

jduff
Copy link
Contributor

@jduff jduff commented Aug 3, 2021

Psych 4 changes load to safe_load which doesn't allow aliases in the yaml file. To allow aliases you need to call unsafe_load which is what this PR is changing.

This is making similar assumptions to Rails that a file within your project is safe because it is controlled by the project owner. A recent example of how this was fixed in Rails is here

Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the changelog if the new code introduces user-observable changes. See changelog entry format for details.

@rabotyaga
Copy link
Contributor

Hi @jduff 👋 !
Thanks for the PR!

@rabotyaga rabotyaga merged commit e779e7d into toptal:master Aug 4, 2021
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.

3 participants