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

akos-egg-nos

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

akos-egg-nos - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

8

lib/loader.js

@@ -72,6 +72,8 @@ 'use strict';

app.nos.getPrivateObjectUrl = function(bucketName, key, expire) {
const config = app.config.nos;
bucketName = bucketName || config.bucket;
expire = expire || 120 * 60 * 1000;
if (!bucketName || !key || !expire) {
throw new Error('config is not right');
}
const config = app.config.nos;
const httpVerb = 'GET';

@@ -81,5 +83,5 @@ const resourcePath = `/${bucketName}/${encodeURI(key)}`;

const message = `${httpVerb}\n\n\n${expiration}\n${resourcePath}`;
const secretMessage = crypto.createHmac('SHA256', config.secretKey).update(message).digest('base64');
return `https://${config.bucket}.${config.endpoint}/${encodeURI(key)}?Signature=${encodeURIComponent(secretMessage)}&Expires=${expiration}&NOSAccessKeyId=${config.accesskey}`;
const secretMessage = crypto.createHmac('SHA256', config.secretId).update(message).digest('base64');
return `https://${config.bucket}.${config.endpoint}/${encodeURI(key)}?Signature=${encodeURIComponent(secretMessage)}&Expires=${expiration}&NOSAccessKeyId=${config.accessId}`;
};
};
{
"name": "akos-egg-nos",
"version": "1.0.9",
"version": "1.0.10",
"description": "[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][download-url]",

@@ -5,0 +5,0 @@ "eggPlugin": {

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