Socket
Socket
Sign inDemoInstall

hawk

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.11.0 to 0.11.1

lib/browser.js

6

lib/client.js

@@ -161,3 +161,3 @@ // Load modules

var tsm = Crypto.calculateTsMac(attributes.ts, credentials);
if (!Cryptiles.fixedTimeComparison(tsm, attributes.tsm)) {
if (tsm !== attributes.tsm) {
return false;

@@ -185,3 +185,3 @@ }

var mac = Crypto.calculateMac('response', credentials, artifacts);
if (!Cryptiles.fixedTimeComparison(mac, attributes.mac)) {
if (mac !== attributes.mac) {
return false;

@@ -199,4 +199,4 @@ }

var calculatedHash = Crypto.calculateHash(options.payload, credentials.algorithm, res.headers['content-type']);
return Cryptiles.fixedTimeComparison(calculatedHash, attributes.hash);
return (calculatedHash === attributes.hash);
};
{
"name": "hawk",
"description": "HTTP Hawk Authentication Scheme",
"version": "0.11.0",
"version": "0.11.1",
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)",

@@ -6,0 +6,0 @@ "contributors": [],

@@ -6,3 +6,3 @@ ![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png)

Current version: **0.11.0**
Current version: **0.11.1**

@@ -19,2 +19,3 @@ [![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk)

- [Response Payload Validation](#response-payload-validation)
- [Browser Support](#browser-support)
<p></p>

@@ -346,2 +347,7 @@ - [**Single URI Authorization**](#single-uri-authorization)

## Browser Support
An experimental browser script is provided for including using a `<script>` tag in [lib/browser.js](/lib/browser.js).
# Single URI Authorization

@@ -348,0 +354,0 @@

@@ -0,0 +0,0 @@ // Load modules

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc