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

crumb

Package Overview
Dependencies
Maintainers
2
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 1.1.0 to 1.1.1

2

lib/index.js

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

if (settings.restful === false &&
if (settings.restful === false ||
(!request.route.plugins._crumb || request.route.plugins._crumb.restful === false)) {

@@ -67,0 +67,0 @@

{
"name": "crumb",
"description": "CSRF crumb generation and validation plugin",
"version": "1.1.0",
"version": "1.1.1",
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)",

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

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

{
method: 'POST', path: '/8', config: { plugins: { crumb: { restful: false } } }, handler: function (request, reply) {
method: 'POST', path: '/8', config: { plugins: { crumb: { restful: false, source: 'payload' } } }, handler: function (request, reply) {

@@ -162,4 +162,7 @@ expect(request.payload).to.deep.equal({ key: 'value' });

server.inject({ method: 'POST', url: '/8', payload: '{ "key": "value" }', headers: validHeader }, function (res) {
var payload = { key: 'value', crumb: cookie[1] };
delete validHeader['x-csrf-token'];
server.inject({ method: 'POST', url: '/8', payload: JSON.stringify(payload), headers: validHeader }, function (res) {
expect(res.result).to.equal('valid');

@@ -166,0 +169,0 @@ done();

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