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

calamarble-xhub

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calamarble-xhub - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

2

package.json
{
"name": "calamarble-xhub",
"description": "xhub signature verification for POST requests from facebook",
"version": "0.1.7",
"version": "0.1.8",
"main": "./src/index.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -19,3 +19,5 @@ 'use strict';

const apiEndpoint = config => (req, res) => {
const serverSignature = signSha1(config.xHubSecret, JSON.stringify(req.body));
const rawBody = req.rawBody || JSON.stringify(req.body);
const xHubSignature = req.headers['X-Hub-Signature'];
const serverSignature = signSha1(config.xHubSecret, rawBody);
const result = _extends({}, req.headers, {

@@ -25,4 +27,6 @@ 'my-debug-header': serverSignature

console.log('serverSignature:', serverSignature);
console.log('X-Hub-Signature', xHubSignature);
console.log('HEADERS', req.headers);
console.log('RAW BODY', req.rawBody);
console.log('RAW BODY TYPE', typeof req.rawBody);
console.log('BODY', req.body);

@@ -29,0 +33,0 @@ console.log('stringified BODY', JSON.stringify(req.body));

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