Skip to content

Commit

Permalink
spec for CVE-2023-51774 mitigation
Browse files Browse the repository at this point in the history
  • Loading branch information
nov committed Mar 6, 2024
1 parent fcc22b0 commit 22fce18
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/json/jwt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,14 @@
end
end
end

context 'when JWS & JWE can be mixed-up (CVE-2023-51774)' do
it do
expect do
JSON::JWT.decode 'header.encrypted_key.iv.cipher_text.authentication_tag', 'secret', nil, nil, true
end.to raise_error JSON::JWT::InvalidFormat
end
end
end

describe '.pretty_generate' do
Expand Down

0 comments on commit 22fce18

Please sign in to comment.