Skip to content

Commit 22fce18

Browse files
committed
spec for CVE-2023-51774 mitigation
1 parent fcc22b0 commit 22fce18

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/json/jwt_spec.rb

+8
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,14 @@
504504
end
505505
end
506506
end
507+
508+
context 'when JWS & JWE can be mixed-up (CVE-2023-51774)' do
509+
it do
510+
expect do
511+
JSON::JWT.decode 'header.encrypted_key.iv.cipher_text.authentication_tag', 'secret', nil, nil, true
512+
end.to raise_error JSON::JWT::InvalidFormat
513+
end
514+
end
507515
end
508516

509517
describe '.pretty_generate' do

0 commit comments

Comments
 (0)