Skip to content

FIX: Allow Date values and YAML aliases in parsing#4

Merged
ducks merged 1 commit into
mainfrom
fix/yaml-load-restricted-classes
Mar 1, 2026
Merged

FIX: Allow Date values and YAML aliases in parsing#4
ducks merged 1 commit into
mainfrom
fix/yaml-load-restricted-classes

Conversation

@ducks
Copy link
Copy Markdown
Owner

@ducks ducks commented Feb 27, 2026

Psych::Pure.load and the paranoid verify_semantics! calls were using default restricted mode, which rejects Date class objects and YAML aliases. Added permitted_classes and aliases: true to both parse sites. Switched verify_semantics! from YAML.load to YAML.safe_load with explicit permitted classes.

Added tests for Date values, YAML aliases, and combined usage.

Fixes #2

Psych::Pure.load and the paranoid verify_semantics! calls were using
default restricted mode, which rejects Date class objects and YAML
aliases. Added permitted_classes and aliases: true to both parse
sites. Switched verify_semantics! from YAML.load to YAML.safe_load
with explicit permitted classes.

Added tests for Date values, YAML aliases, and combined usage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ducks ducks merged commit 7ff8b5b into main Mar 1, 2026
2 checks passed
@jasnow
Copy link
Copy Markdown

jasnow commented Mar 1, 2026

Thank you

@ducks
Copy link
Copy Markdown
Owner Author

ducks commented Mar 1, 2026

np, thanks for the report! and let me know if you run into other issues.

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.

Getting two error message with "yaml-janitor ." on my project

2 participants