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

@cubejs-backend/api-gateway

Package Overview
Dependencies
Maintainers
2
Versions
596
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cubejs-backend/api-gateway - npm Package Compare versions

Comparing version 0.11.16 to 0.11.17

index.test.js

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [0.11.17](https://github.com/statsbotco/cubejs-client/compare/v0.11.16...v0.11.17) (2019-11-08)
### Bug Fixes
* Default Express middleware security check is ignored in production ([4bdf6bd](https://github.com/statsbotco/cubejs-client/commit/4bdf6bd))
## [0.11.16](https://github.com/statsbotco/cubejs-client/compare/v0.11.15...v0.11.16) (2019-11-04)

@@ -8,0 +19,0 @@

13

index.js

@@ -243,2 +243,3 @@ const jwt = require('jsonwebtoken');

this.subscriptionStore = options.subscriptionStore || new LocalSubscriptionStore();
this.enforceSecurityChecks = options.enforceSecurityChecks || (process.env.NODE_ENV === 'production');
}

@@ -469,3 +470,3 @@

} catch (e) {
if (process.env.NODE_ENV === 'production') {
if (this.enforceSecurityChecks) {
throw new UserError('Invalid token');

@@ -480,3 +481,3 @@ } else {

}
} else if (process.env.NODE_ENV === 'production') {
} else if (this.enforceSecurityChecks) {
throw new UserError("Authorization header isn't set");

@@ -490,3 +491,6 @@ }

try {
this.checkAuthFn(req, auth);
await this.checkAuthFn(req, auth);
if (next) {
next();
}
} catch (e) {

@@ -504,5 +508,2 @@ if (e instanceof UserError) {

}
if (next) {
next();
}
}

@@ -509,0 +510,0 @@

@@ -5,3 +5,3 @@ {

"author": "Statsbot, Inc.",
"version": "0.11.16",
"version": "0.11.17",
"engines": {

@@ -25,8 +25,10 @@ "node": ">=8.11.1"

"eslint-plugin-node": "^5.2.1",
"express": "^4.17.1",
"jest": "^24.9.0",
"mocha": "^5.2.0",
"should": "^13.2.3"
"should": "^13.2.3",
"supertest": "^4.0.2"
},
"license": "Apache-2.0",
"gitHead": "c0257370432d087f72980ccc65c1bc4d53674362"
"gitHead": "fc330e8ade7e5fc484f05497c974395a68d425e4"
}
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