diff options
author | Eric Wong <e@80x24.org> | 2022-01-20 18:34:19 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-01-21 19:54:43 +0000 |
commit | 88a8d4793473259b392241f1e2d20d39bd96b214 (patch) | |
tree | 28e3fb5d17017038045de143bd2e6a7d95655d0d /bin/dtas-console | |
parent | 748c3633ce794685af343de0bcd24eca7440281b (diff) | |
download | dtas-88a8d4793473259b392241f1e2d20d39bd96b214.tar.gz |
Psych 4.x defaults to "nanny mode" to handle untrusted data. This causes breakage with since YAML references (aliases) emitted by dtas-player can't be handled by Psych clients under Ruby 3.1. Since dtas is single user and is a shell designed to run arbitrary code, favor the new YAML.unsafe_load API which behaves like the old YAML.load in Ruby <= 3.0.
Diffstat (limited to 'bin/dtas-console')
-rwxr-xr-x | bin/dtas-console | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/dtas-console b/bin/dtas-console index e02dda4..a519ba9 100755 --- a/bin/dtas-console +++ b/bin/dtas-console @@ -27,7 +27,7 @@ trap(:WINCH) { se.signal } w = DTAS::UNIXClient.new w.req_ok('watch') c = DTAS::UNIXClient.new -cur = YAML.load(c.req('current')) +cur = DTAS.yaml_load(c.req('current')) readable = [ se, w, $stdin ] set_title = (ENV['DISPLAY'] || ENV['WAYLAND_DISPLAY']) ? $stdout : nil @@ -254,7 +254,7 @@ begin events << "#{Time.now.strftime(tfmt)} #{event}" # something happened, refresh current # we could be more intelligent here, maybe, but too much work. - cur = YAML.load(c.req('current')) + cur = DTAS.yaml_load(c.req('current')) when $stdin # keybindings taken from mplayer / vi case key = Curses.getch |