Comparing version 1.22.0 to 1.22.1
@@ -5,2 +5,11 @@ # Change Log | ||
## [1.22.1](https://github.com/panva/jose/compare/v1.22.0...v1.22.1) (2020-02-03) | ||
### Bug Fixes | ||
* actually remove the base64url proper encoding check ([eae01b5](https://github.com/panva/jose/commit/eae01b57ab9f33e8c621ffcd2a77d513a51d22b2)) | ||
# [1.22.0](https://github.com/panva/jose/compare/v1.21.1...v1.22.0) (2020-01-29) | ||
@@ -7,0 +16,0 @@ |
@@ -1,5 +0,1 @@ | ||
const { JOSEInvalidEncoding } = require('../errors') | ||
const b64uRegExp = /^[a-zA-Z0-9_-]*$/ | ||
const fromBase64 = (base64) => { | ||
@@ -18,6 +14,2 @@ return base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_') | ||
const decodeToBuffer = (input) => { | ||
if (!b64uRegExp.test(input)) { | ||
throw new JOSEInvalidEncoding('input is not a valid base64url encoded string') | ||
} | ||
return Buffer.from(input, 'base64') | ||
@@ -24,0 +16,0 @@ } |
@@ -16,9 +16,2 @@ const { sign: signOneShot, verify: verifyOneShot, createSign, createVerify, getCurves } = require('crypto') | ||
} | ||
} else { | ||
sign = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload) => { | ||
return derToJose(createSign(nodeAlg).update(payload).sign(asInput(keyObject, false)), jwaAlg) | ||
} | ||
} | ||
if (dsaEncodingSupported) { | ||
verify = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => { | ||
@@ -32,2 +25,5 @@ try { | ||
} else { | ||
sign = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload) => { | ||
return derToJose(createSign(nodeAlg).update(payload).sign(asInput(keyObject, false)), jwaAlg) | ||
} | ||
verify = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => { | ||
@@ -34,0 +30,0 @@ try { |
{ | ||
"name": "jose", | ||
"version": "1.22.0", | ||
"version": "1.22.1", | ||
"description": "JSON Web Almost Everything - JWA, JWS, JWE, JWK, JWT, JWKS for Node.js with minimal dependencies", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
223264
4796