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

Fix YAML loading #61

Merged
merged 1 commit into from
Apr 27, 2022
Merged

Fix YAML loading #61

merged 1 commit into from
Apr 27, 2022

Conversation

liveh2o
Copy link
Contributor

@liveh2o liveh2o commented Apr 27, 2022

Psych (aka YAML) 4.x included a breaking change to how YAML.load works In Psych 4.0, load calls safe_load under the hood, and is therefore "safe" by default, but that breaks configurations that support (among other things) aliases, which are disabled when using "safe" loading.

unsafe_load is now the canonical way to load trusted documents (i.e., config files): ruby/psych#533 (comment)

To ensure maximum compatibility with old versions of Psych, we also need to set a minimum version of Psych to ensure unsafe_load is defined. The methods were introduced in v3.3.2: ruby/psych@cb50aa8

Resolves #60

Psych (aka YAML) 4.x included a breaking change to how `YAML.load` works
In Psych 4.0, `load` calls `safe_load` under the hood, and is therefore
"safe" by default, but that breaks configurations that support (among
other things) aliases, which are disabled when using "safe" loading.

`unsafe_load` is now the canonical way to load trusted documents (i.e.,
config files): ruby/psych#533 (comment)

To ensure maximum compatibility with old versions of Psych, we also need
to set a minimum version of Psych to ensure `unsafe_load` is defined.
The methods were introduced in v3.3.2:
ruby/psych@cb50aa8

Resolves #60
@liveh2o
Copy link
Contributor Author

liveh2o commented Apr 27, 2022

Going to cut a prerelease of this to verify there aren't any issues.

@liveh2o liveh2o merged commit 62ea7b9 into master Apr 27, 2022
@liveh2o liveh2o deleted the ah/fix_yaml_loading branch April 27, 2022 23:10
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.

Breaking changes in YAML loading (Psych)
2 participants