Comparing version 0.2.30 to 0.2.31
@@ -10,3 +10,7 @@ // modified from https://bitbucket.org/knecht_andreas/atlassian-oauth-validator | ||
var verifier = crypto.createVerify(options.signatureMethod); | ||
var signatureBase = createSignatureBase(options.method, options.url, normaliseRequestParams(options.query)); | ||
var normParams = normaliseRequestParams(options.query); | ||
var signatureBase = createSignatureBase(options.method, options.url, normParams); | ||
if (options.logger) { | ||
options.logger.warn("DEBUG: oauth.verify sig base:", signatureBase); | ||
} | ||
verifier.update(signatureBase); | ||
@@ -13,0 +17,0 @@ if (verifier.verify(ensurePem("PUBLIC", options.publicKey), options.signature, "base64")) { |
@@ -95,10 +95,6 @@ // modified from https://bitbucket.org/knecht_andreas/atlassian-oauth-validator | ||
var qIndex = path.indexOf("?"); | ||
if (qIndex >= 0) { | ||
path = path.slice(0, qIndex); | ||
} | ||
if (qIndex >= 0) path = path.slice(0, qIndex); | ||
var url = urls.parse(plugin.config.localBaseUrl()); | ||
url.pathname = path; | ||
url = url.format(url); | ||
var debugUrl = req.protocol + "://" + req.header("host") + path; | ||
plugin.logger.warn("DEBUG:", req.originalUrl, plugin.config.localBaseUrl(), url, debugUrl); | ||
@@ -112,3 +108,4 @@ function verify(publicKey) { | ||
signature: signature, | ||
signatureMethod: method | ||
signatureMethod: method, | ||
logger: plugin.logger | ||
}, function (err) { | ||
@@ -115,0 +112,0 @@ if (err) { |
{ | ||
"name": "ap3", | ||
"version": "0.2.30", | ||
"version": "0.2.31", | ||
"description": "Atlassian Plugins 3 library for Express", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
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
925
32544