sam
(Sam Saffron)
8
loofah の HTML5 版を試したところ、セキュリティの問題が発生しているようです。
1) PrettyText provides safety for img bbcode
Failure/Error: expect(cooked).to eq(html)
expected: "<p><img src=\"http://aaa.com<script>alert(1);</script>\" alt=\"\" role=\"presentation\"></p>"
got: "<p><img src=\"http://aaa.com<script>alert(1);</script>\" alt=\"\" role=\"presentation\"></p>"
(compared using ==)
# ./spec/lib/pretty_text_spec.rb:2150:in `block (2 levels) in <main>'
# ./spec/rails_helper.rb:358:in `block (2 levels) in <top (required)>'
# /home/sam/.gem/ruby/3.2.1/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'
これは非常に危険な気がします…提起します…
「いいね!」 3