Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jose-browser-runtime

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jose-browser-runtime - npm Package Compare versions

Comparing version 3.20.3 to 3.20.4

4

dist/browser/jwe/flattened/decrypt.js

@@ -98,6 +98,6 @@ import { decode as base64url } from '../../runtime/base64url.js';

try {
cek = await decryptKeyManagement(alg, key, encryptedKey, joseHeader);
cek = await decryptKeyManagement(alg, key, encryptedKey, joseHeader, options);
}
catch (err) {
if (err instanceof TypeError) {
if (err instanceof TypeError || err instanceof JWEInvalid || err instanceof JOSENotSupported) {
throw err;

@@ -104,0 +104,0 @@ }

@@ -12,3 +12,3 @@ import { unwrap as aesKw } from '../runtime/aeskw.js';

import isObject from './is_object.js';
async function decryptKeyManagement(alg, key, encryptedKey, joseHeader) {
async function decryptKeyManagement(alg, key, encryptedKey, joseHeader, options) {
checkKeyType(alg, key, 'decrypt');

@@ -67,2 +67,5 @@ switch (alg) {

throw new JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`);
const p2cLimit = (options === null || options === void 0 ? void 0 : options.maxPBES2Count) || 10000;
if (joseHeader.p2c > p2cLimit)
throw new JWEInvalid(`JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds`);
if (typeof joseHeader.p2s !== 'string')

@@ -69,0 +72,0 @@ throw new JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`);

@@ -202,2 +202,3 @@ /**

inflateRaw?: InflateFunction
maxPBES2Count?: number
}

@@ -204,0 +205,0 @@ export interface EncryptOptions extends CritOption {

{
"name": "jose-browser-runtime",
"version": "3.20.3",
"version": "3.20.4",
"description": "(Browser Runtime) 'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK with no dependencies",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc