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

knox

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knox - npm Package Compare versions

Comparing version 0.4.6 to 0.4.7

23

lib/client.js

@@ -49,2 +49,10 @@ /*!

function encodeSpecialCharacters(filename) {
// Note: these characters are valid in URIs, but S3 does not like them for
// some reason.
return filename.replace(/[!'()*]/g, function (char) {
return '%' + char.charCodeAt(0).toString(16);
});
}
function getHeader(headers, headerNameLowerCase) {

@@ -118,3 +126,3 @@ for (var header in headers) {

filename = ensureLeadingSlash(filename);
filename = encodeSpecialCharacters(ensureLeadingSlash(filename));

@@ -659,3 +667,3 @@ // Default headers

Client.prototype.signedUrl = function(filename, expiration){
Client.prototype.signedUrl = function(filename, expiration, otherParams){
var epoch = Math.floor(expiration.getTime()/1000)

@@ -671,6 +679,9 @@ , pathname = url.parse(filename).pathname

return this.url(ensureLeadingSlash(filename)) +
'?Expires=' + epoch +
'&AWSAccessKeyId=' + this.key +
'&Signature=' + encodeURIComponent(signature);
var queryString = qs.stringify(utils.merge({
Expires: epoch,
AWSAccessKeyId: this.key,
Signature: signature
}, otherParams || {}));
return this.url(ensureLeadingSlash(filename)) + '?' + queryString;
};

@@ -677,0 +688,0 @@

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

"keywords": ["aws", "amazon", "s3"],
"version": "0.4.6",
"version": "0.4.7",
"author": "TJ Holowaychuk <tj@learnboost.com>",

@@ -8,0 +8,0 @@ "contributors": [

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