@studio/gateway
Advanced tools
+7
-0
| # Changes | ||
| ## 2.5.4 | ||
| - [`363bcc2`](https://github.com/javascript-studio/studio-gateway/commit/363bcc2b5f3c2d4e198b6eb74b249f82c399a9c2) | ||
| Response with 403 if custom authorizer responds with deny | ||
| _Released by [Maximilian Antoni](https://github.com/mantoni) on 2024-01-09._ | ||
| ## 2.5.3 | ||
@@ -4,0 +11,0 @@ |
+5
-5
@@ -8,4 +8,4 @@ /* | ||
| function reject(res, message) { | ||
| res.writeHead(401, { 'Content-Type': 'application/json' }); | ||
| function reject(res, status, message) { | ||
| res.writeHead(status, { 'Content-Type': 'application/json' }); | ||
| res.end(JSON.stringify({ message })); | ||
@@ -52,3 +52,3 @@ } | ||
| if (re && !re.test(authorizationToken)) { | ||
| reject(res, 'Unauthorized'); | ||
| reject(res, 401, 'Unauthorized'); | ||
| return; | ||
@@ -66,3 +66,3 @@ } | ||
| if (err) { | ||
| reject(res, String(err)); | ||
| reject(res, 401, String(err)); | ||
| return; | ||
@@ -72,3 +72,3 @@ } | ||
| if (Statement.length !== 1 || Statement[0].Effect !== 'Allow') { | ||
| reject(res, 'Unauthorized'); | ||
| reject(res, 403, 'Unauthorized'); | ||
| return; | ||
@@ -75,0 +75,0 @@ } |
+1
-1
| { | ||
| "name": "@studio/gateway", | ||
| "version": "2.5.3", | ||
| "version": "2.5.4", | ||
| "description": "JavaScript Studio Gateway", | ||
@@ -5,0 +5,0 @@ "author": "Maximilian Antoni <max@javascript.studio>", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
41364
0.71%