From c97325bf00f385845a9d8767f13968ab62d44237 Mon Sep 17 00:00:00 2001 From: Karol Date: Sun, 3 Apr 2016 14:27:20 +0300 Subject: [PATCH] no access for this.parameters at isSignatureValid force isSignatureValid useing this. of Pingback Object to get access for parameters otherwise its empty and therefore validation fails. --- lib/paymentwall/pingback.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/paymentwall/pingback.js b/lib/paymentwall/pingback.js index 7dc65e2..8d300a0 100644 --- a/lib/paymentwall/pingback.js +++ b/lib/paymentwall/pingback.js @@ -25,7 +25,7 @@ util._extend(Pingback.prototype, { if (this.isParametersValid()) { if (this.isIpAddressValid() || skipIpWhitelistCheck) { - if (this.isSignatureValid()) { + if (this.isSignatureValid.bind(this)) { validated = true; } else { this.appendToErrors('Wrong signature'); @@ -240,4 +240,4 @@ util._extend(Pingback.prototype, { } }); -module.exports = Pingback; \ No newline at end of file +module.exports = Pingback;