New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

deed

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deed - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

11

index.js

@@ -11,8 +11,13 @@

function write (buf) {
return new string_decoder.StringDecoder().write(buf)
return new string_decoder.StringDecoder('hex').write(buf)
}
function match (hmac, sig) {
var str = write(hmac.digest('hex'))
return ('sha1=' + str) === sig
var chunk
, str = 'sha1='
;
while (null !== (chunk = hmac.read())) {
str += write(chunk)
}
return str === sig
}

@@ -19,0 +24,0 @@

{
"name": "deed",
"version": "0.0.2",
"version": "0.0.3",
"description": "verify x-hub-signature",

@@ -5,0 +5,0 @@ "main": "index.js",

# deed - verify x-hub-signature
The deed [Node.js](http://nodejs.org/) module verifies [X-Hub-Signature](http://pubsubhubbub.googlecode.com/git/pubsubhubbub-core-0.3.html#aggregatedistribution) headers.
The deed [Node.js](http://nodejs.org/) module verifies [X-Hub-Signature](http://pubsubhubbub.googlecode.com/git/pubsubhubbub-core-0.3.html#authednotify) headers.

@@ -27,5 +27,7 @@ [![Build Status](https://secure.travis-ci.org/michaelnisi/deed.svg)](http://travis-ci.org/michaelnisi/deed) [![David DM](https://david-dm.org/michaelnisi/deed.svg)](http://david-dm.org/michaelnisi/deed)

- `er` The error if an error occures or the authorisation fails
- `req` The verified request
The callback called when **deed** is done receives the request if all went well.
- `er` The error if an error occured or verification failed.
- `req` The verified request.
## exports

@@ -35,4 +37,6 @@

- `secret` The key to hash the payload
- `req` The request to verify
The sole function exported by the **deed** module checks if the request body hashed with the secret matches the `X-Hub-Signature` header.
- `secret` The key to hash the payload.
- `req` The request to verify.
- `cb` cb()

@@ -39,0 +43,0 @@

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