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

narratives: Load YAML frontmatter safely #1472

Merged
merged 1 commit into from
Feb 23, 2022
Merged

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Feb 17, 2022

Prevents deserializing potentially unsafe data types from user input.

yaml-front-matter uses js-yaml 3.x, which is unsafe by default, hence
the "safe" mode. js-yaml 4.x is safe by default, but not used here.

Prevents deserializing potentially unsafe data types from user input.

yaml-front-matter uses js-yaml 3.x, which is unsafe by default, hence
the "safe" mode. js-yaml 4.x is safe by default, but not used here.
@tsibley tsibley requested a review from a team February 17, 2022 00:17
@nextstrain-bot nextstrain-bot temporarily deployed to auspice-trs-load-yaml-s-9hj1op February 17, 2022 00:18 Inactive
@tsibley
Copy link
Member Author

tsibley commented Feb 17, 2022

See also nextstrain/nextstrain.org#473.

Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

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

Looks good and tested on a number of existing narratives with no observed changes (as expected!)

@jameshadfield jameshadfield merged commit 08d897d into master Feb 23, 2022
@jameshadfield jameshadfield deleted the trs/load-yaml-safely branch February 23, 2022 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants