jose 2.0.6 → 2.0.7

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.
@@ -52,7 +52,7 @@ const validateAlgorithms = (algorithms, option) => {
52
52
  /*
53
53
  * @public
54
54
  */
55
- const jweDecrypt = (skipValidateHeaders, serialization, jwe, key, { crit = [], complete = false, keyManagementAlgorithms, contentEncryptionAlgorithms, maxPBES2Count = 10000 } = {}) => {
55
+ const jweDecrypt = (skipValidateHeaders, serialization, jwe, key, { crit = [], complete = false, keyManagementAlgorithms, contentEncryptionAlgorithms, maxPBES2Count = 10000, inflateRawSyncLimit = 250000 } = {}) => {
56
56
  key = getKey(key, true)
57
57
 
58
58
  keyManagementAlgorithms = validateAlgorithms(keyManagementAlgorithms, 'keyManagementAlgorithms')
@@ -189,7 +189,7 @@ const jweDecrypt = (skipValidateHeaders, serialization, jwe, key, { crit = [], c
189
189
  let cleartext = decrypt(enc, cek, base64url.decodeToBuffer(ciphertext), { iv, tag, aad: adata })
190
190
 
191
191
  if (opts.zip) {
192
- cleartext = inflateRawSync(cleartext)
192
+ cleartext = inflateRawSync(cleartext, { maxOutputLength: inflateRawSyncLimit })
193
193
  }
194
194
 
195
195
  if (complete) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jose",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "JSON Web Almost Everything - JWA, JWS, JWE, JWK, JWT, JWKS for Node.js with minimal dependencies",
5
5
  "keywords": [
6
6
  "access token",
package/types/index.d.ts CHANGED
@@ -402,6 +402,7 @@ export namespace JWE {
402
402
  contentEncryptionAlgorithms?: string[];
403
403
  keyManagementAlgorithms?: string[];
404
404
  maxPBES2Count?: number;
405
+ inflateRawSyncLimit?: number;
405
406
  }
406
407
 
407
408
  interface completeDecrypt {