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.6 to 0.4.7

7

lib/authorization.js

@@ -17,3 +17,3 @@ /*jslint node:true, nomen:false */

var isSelf = false;
if (req[csauth][fields.id] === req.params[params.id]) {
if (req[csauth][fields.id] === req.param(params.id)) {
isSelf = true;

@@ -104,6 +104,4 @@ next();

restrictToRoles : function(roles) {
var userRoles;
roles = roles ? [].concat(roles) : [];
return function(req,res,next) {
var allowed = false, i, userRoles;
if (checkLoggedIn(req,res,next)) {

@@ -120,3 +118,2 @@ if (!checkUserRoles(req,res,next,roles)) {

return function(req,res,next) {
var allowed = false, i, userRoles;
if (checkLoggedIn(req,res,next)) {

@@ -134,3 +131,2 @@ if (!checkSelf(req,res,next)) {

return function(req,res,next) {
var allowed = false, i, userRoles;
if (checkLoggedIn(req,res,next)) {

@@ -150,3 +146,2 @@ if (!checkParam(req,res,next,param)) {

// valid if the user name is the same as the param name, or the logged in user is an admin
var allowed = false, i, userRoles, id, valid = false;
if (checkLoggedIn(req,res,next)) {

@@ -153,0 +148,0 @@ if (!checkUserRoles(req,res,next,roles)) {

2

package.json
{
"name": "cansecurity",
"description": "Authentication, authorization, session manager, single-sign-on (SSO) and security framework for node applications",
"version": "0.4.6",
"version": "0.4.7",
"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