Comparing version 0.3.0 to 0.3.1
// 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 @@ |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72603
2
144
- Removedboom@0.4.x
- Removedhoek@0.8.x
- Removedhoek@0.8.5(transitive)