jose 6.2.2 → 6.2.3
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.
|
@@ -9,7 +9,7 @@ function isCloudflareWorkers() {
|
|
|
9
9
|
let USER_AGENT;
|
|
10
10
|
if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
|
|
11
11
|
const NAME = 'jose';
|
|
12
|
-
const VERSION = 'v6.2.
|
|
12
|
+
const VERSION = 'v6.2.3';
|
|
13
13
|
USER_AGENT = `${NAME}/${VERSION}`;
|
|
14
14
|
}
|
|
15
15
|
export const customFetch = Symbol();
|
|
@@ -17,6 +17,9 @@ async function deriveKey(p2s, alg, p2c, key) {
|
|
|
17
17
|
if (!(p2s instanceof Uint8Array) || p2s.length < 8) {
|
|
18
18
|
throw new JWEInvalid('PBES2 Salt Input must be 8 or more octets');
|
|
19
19
|
}
|
|
20
|
+
if (!Number.isSafeInteger(p2c) || Math.sign(p2c) !== 1) {
|
|
21
|
+
throw new JWEInvalid('PBES2 Count Input must be a positive integer');
|
|
22
|
+
}
|
|
20
23
|
const salt = concatSalt(alg, p2s);
|
|
21
24
|
const keylen = parseInt(alg.slice(13, 16), 10);
|
|
22
25
|
const subtleAlg = {
|