Skip to content

Commit 719797f

Browse files
committed
Preserve claims verification state for unencoded payloads
1 parent bedd65a commit 719797f

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
**Fixes and enhancements:**
1212

13+
- Preserve claims verification state when decoding unencoded payloads [#753](https://github.com/jwt/ruby-jwt/pull/753) - [@OskarEichler](https://github.com/OskarEichler)
1314
- Fix rejection of unknown algorithms from JWKs for RFC compliance and pquip [#728](https://github.com/jwt/ruby-jwt/pull/728)
1415
- Fix the `Style/DirectiveScope` RuboCop offense failing the build [#752](https://github.com/jwt/ruby-jwt/pull/752)
1516

lib/jwt/encoded_token.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def decode_payload
190190
raise JWT::DecodeError, 'Encoded payload is empty' if encoded_payload == ''
191191

192192
if unencoded_payload?
193-
verify_claims!(crit: ['b64'])
193+
Claims::Crit.new(expected_crits: ['b64']).verify!(context: ClaimsContext.new(self))
194194
return parse_unencoded(encoded_payload)
195195
end
196196

0 commit comments

Comments
 (0)