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

cansecurity

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

cansecurity - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

17

lib/authorization.js

@@ -57,7 +57,14 @@ /*jslint node:true, nomen:false */

checkField = function(req,res,next,field,getObject) {
var id = req[csauth][fields.id], i, valid = false, obj = getObject(req,res) || {};
// check the ID of the user against each field in each result for which it is allowed
for (i=0;i<field.length;i++) {
if (id === obj[field[i]]) {
valid = true;
var id = req[csauth][fields.id], i, j, valid, list = [].concat(getObject(req,res) || {});
// check the ID of the user against each field in each result for which it is allowed, for each object
// *all* must pass to be allowed
for (j=0;j<list.length;j++) {
valid = false;
for (i=0;i<field.length;i++) {
if (id === list[j][field[i]]) {
valid = true;
break;
}
}
if (!valid) {
break;

@@ -64,0 +71,0 @@ }

{
"name": "cansecurity",
"description": "Authentication, authorization, session manager, single-sign-on (SSO) and security framework for node applications",
"version": "0.4.1",
"version": "0.4.2",
"url": "http://github.com/deitch/cansecurity",

@@ -6,0 +6,0 @@ "author": "Avi Deitcher <avi@deitcher.net>",

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