jwe 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/jwe/enc/aes_gcm.rb +5 -1
- data/lib/jwe/version.rb +1 -1
- data/spec/jwe/enc_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 932d7aac27c18e27353fbe02c694c9aca3c87a4c76ede9d663f462760d6c5ada
|
4
|
+
data.tar.gz: 1d1d72e8b5ba18424afaf70932fd08b6d9cbeb5a6ba55356e15a82f1a94695ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 261a2c1920567bac989577ca58d498c61bf7d4912c4d66a9232448ef357e997bbc9d8b7ce9fd0828bbf7e3e14f93e49bb7ad4ecb54ea071574247389f27d4992
|
7
|
+
data.tar.gz: 51f82c565e51404d7fced2d27e65f39586e56026cf8fcd77c5fb99c8e08cc8363e2bd3c37dec13b4b5cfefb701edb45f3ad61591307c68b194bd7151f80bb48d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v1.1.1](https://github.com/jwt/ruby-jwe/tree/v1.1.1) (2025-08-07)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/jwt/ruby-jwe/compare/v1.1.0...v1.1.1)
|
6
|
+
|
7
|
+
**Fixes and enhancements:**
|
8
|
+
|
9
|
+
- Fix tag length checking for AES-GCM (CVE-2025-54887)
|
10
|
+
|
3
11
|
## [v1.1.0](https://github.com/jwt/ruby-jwe/tree/v1.1.0) (2025-07-22)
|
4
12
|
|
5
13
|
[Full Changelog](https://github.com/jwt/ruby-jwe/compare/v1.0.0...v1.1.0)
|
data/lib/jwe/enc/aes_gcm.rb
CHANGED
@@ -38,7 +38,11 @@ module JWE
|
|
38
38
|
cipher.send(direction)
|
39
39
|
cipher.key = cek
|
40
40
|
cipher.iv = iv
|
41
|
-
|
41
|
+
if direction == :decrypt
|
42
|
+
raise JWE::InvalidData, 'Invalid ciphertext or authentication tag' unless tag.bytesize == 16
|
43
|
+
|
44
|
+
cipher.auth_tag = tag
|
45
|
+
end
|
42
46
|
cipher.auth_data = auth_data
|
43
47
|
end
|
44
48
|
|
data/lib/jwe/version.rb
CHANGED
data/spec/jwe/enc_spec.rb
CHANGED
@@ -130,6 +130,14 @@ gcm.each do |group|
|
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
133
|
+
context 'when the tag is not 16 bytes' do
|
134
|
+
it 'raises an error' do
|
135
|
+
enc = klass.new(key, group[:iv])
|
136
|
+
enc.tag = group[:tag][0...-1]
|
137
|
+
expect { enc.decrypt(group[:helloworld], '') }.to raise_error(JWE::InvalidData)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
133
141
|
context 'when the ciphertext is not valid' do
|
134
142
|
it 'raises an error' do
|
135
143
|
enc = klass.new(key, group[:iv])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jwe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesco Boffa
|
@@ -78,7 +78,7 @@ licenses:
|
|
78
78
|
- MIT
|
79
79
|
metadata:
|
80
80
|
bug_tracker_uri: https://github.com/jwt/ruby-jwe/issues
|
81
|
-
changelog_uri: https://github.com/jwt/ruby-jwe/blob/v1.1.
|
81
|
+
changelog_uri: https://github.com/jwt/ruby-jwe/blob/v1.1.1/CHANGELOG.md
|
82
82
|
rubygems_mfa_required: 'true'
|
83
83
|
rdoc_options: []
|
84
84
|
require_paths:
|