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

crumb

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crumb - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

10

lib/index.js
// Load modules
var Boom = require('boom');
var Hoek = require('hoek');
var Cryptiles = require('cryptiles');

@@ -31,3 +29,3 @@

var settings = Hoek.applyToDefaults(internals.defaults, options || {});
var settings = plugin.hapi.utils.applyToDefaults(internals.defaults, options || {});

@@ -44,3 +42,3 @@ plugin.state(settings.name, settings.cookieOptions);

request.route.plugins._crumb = Hoek.applyToDefaults(internals.routeDefaults, request.route.plugins.crumb || {});
request.route.plugins._crumb = plugin.hapi.utils.applyToDefaults(internals.routeDefaults, request.route.plugins.crumb || {});
}

@@ -70,7 +68,7 @@ else {

if (!content) {
return next(Boom.forbidden());
return next(plugin.hapi.error.forbidden());
}
if (content[request.route.plugins._crumb.key] !== request.plugins.crumb) {
return next(Boom.forbidden());
return next(plugin.hapi.error.forbidden());
}

@@ -77,0 +75,0 @@

4

package.json
{
"name": "crumb",
"description": "CSRF crumb generation plugin",
"version": "0.3.0",
"version": "0.3.1",
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)",

@@ -20,4 +20,2 @@ "contributors": [],

"dependencies": {
"boom": "0.4.x",
"hoek": "0.8.x",
"cryptiles": "0.2.x"

@@ -24,0 +22,0 @@ },

@@ -0,0 +0,0 @@ <a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a>

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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