New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

microgen-cli

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

microgen-cli - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

22

functions/http.js

@@ -92,4 +92,3 @@ const cote = require("microgen-cote");

const verify = await app.getRequester('user').send({ type: 'verifyToken', token })
const access = typeof authentication == "string" ? verify.user.role == authentication : authentication.includes(verify.user.role);
if(verify.user.role != "admin" && !access) {
if(!verify.user) {
throw new Error("UnAuthorized")

@@ -111,6 +110,17 @@ } else {

if(request.isPublic && connection && connection == "private") {
callback({
statusCode: 403,
message: "Access is forbidden"
}, null);
const token = request.headers.authorization;
if(token) {
const verify = await app.getRequester('user').send({ type: 'verifyToken', token })
if(verify.user.role != "admin") {
callback({
statusCode: 403,
message: "Access is forbidden"
}, null);
}
} else {
callback({
statusCode: 403,
message: "Access is forbidden"
}, null);
}
}

@@ -117,0 +127,0 @@ delete request.isPublic;

{
"name": "microgen-cli",
"version": "0.0.12",
"version": "0.0.13",
"description": "",

@@ -5,0 +5,0 @@ "main": "./bin/index.js",

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