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

port to Psych 4 included in Ruby 3.1 #8

Closed
wants to merge 1 commit into from

Conversation

anarcat
Copy link
Contributor

@anarcat anarcat commented Jan 25, 2023

Since I am not sure when, pwstore just completely fails to start in Debian bookworm:

anarcat@curie:tor-passwords$ ~/src/pwstore/pws update-keyring
Unknown alias: weasel

It turns out this is a failure of the YAML module to load our configuration file because of aliases:

irb(main):004:0> YAML::load_file("/home/anarcat/.pws.yaml")
/usr/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:430:in `visit_Psych_Nodes_Alias': Unknown alias: weasel (Psych::BadAlias)

The fix seems to be to enable aliases, which is what this project has done:

sidekiq/sidekiq#5140

Rails seems to have switched to unsafe load, which seems like a bad idea:

rails/rails#42257

Since I am not sure when, pwstore just completely fails to start in
Debian bookworm:

    anarcat@curie:tor-passwords$ ~/src/pwstore/pws update-keyring
    Unknown alias: weasel

It turns out this is a failure of the YAML module to load our
configuration file because of aliases:

    irb(main):004:0> YAML::load_file("/home/anarcat/.pws.yaml")
    /usr/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:430:in `visit_Psych_Nodes_Alias': Unknown alias: weasel (Psych::BadAlias)

The fix seems to be to enable aliases, which is what this project has
done:

sidekiq/sidekiq#5140

Rails seems to have switched to unsafe load, which seems like a bad
idea:

rails/rails#42257
@weaselp
Copy link
Owner

weaselp commented Feb 19, 2024

A similar change (without the guard for psych version) has been committed some time last year. Is this still needed?

@anarcat
Copy link
Contributor Author

anarcat commented Feb 19, 2024

oh, i guess not...

@anarcat anarcat closed this Feb 19, 2024
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.

None yet

2 participants