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

minio

Package Overview
Dependencies
Maintainers
4
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minio - npm Package Compare versions

Comparing version 7.0.24 to 7.0.25

3

dist/main/extensions.js

@@ -155,3 +155,4 @@ "use strict";

queries.push(`list-type=2`); // escape every value in query string, except maxKeys
queries.push(`list-type=2`);
queries.push(`encoding-type=url`); // escape every value in query string, except maxKeys

@@ -158,0 +159,0 @@ queries.push(`prefix=${(0, _helpers.uriEscape)(prefix)}`);

@@ -39,3 +39,3 @@ "use strict";

exports.sanitizeETag = sanitizeETag;
exports.toSha256 = exports.toMd5 = void 0;
exports.toSha256 = exports.toMd5 = exports.toArray = exports.sanitizeObjectKey = void 0;
exports.uriEscape = uriEscape;

@@ -467,5 +467,27 @@ exports.uriResourceEscape = uriResourceEscape;

return Crypto.createHash('sha256').update(payload).digest('hex');
}; // toArray returns a single element array with param being the element,
// if param is just a string, and returns 'param' back if it is an array
// So, it makes sure param is always an array
exports.toSha256 = toSha256;
var toArray = function toArray(param) {
if (!Array.isArray(param)) {
return Array(param);
}
return param;
};
exports.toSha256 = toSha256;
exports.toArray = toArray;
var sanitizeObjectKey = function sanitizeObjectKey(objectName) {
// + symbol characters are not decoded as spaces in JS. so replace them first and decode to get the correct result.
var asStrName = (objectName || "").replace(/\+/g, ' ');
var sanitizedName = decodeURIComponent(asStrName);
return sanitizedName;
};
exports.sanitizeObjectKey = sanitizeObjectKey;
//# sourceMappingURL=helpers.js.map

@@ -65,13 +65,2 @@ "use strict";

return result;
}; // toArray returns a single element array with param being the element,
// if param is just a string, and returns 'param' back if it is an array
// So, it makes sure param is always an array
var toArray = function toArray(param) {
if (!Array.isArray(param)) {
return Array(param);
}
return param;
}; // Parse XML and return information as Javascript types

@@ -140,5 +129,5 @@ // parse error XML response

if (xmlobj.CommonPrefixes) {
toArray(xmlobj.CommonPrefixes).forEach(function (prefix) {
(0, _helpers.toArray)(xmlobj.CommonPrefixes).forEach(function (prefix) {
result.prefixes.push({
prefix: toArray(prefix)[0]
prefix: (0, _helpers.toArray)(prefix)[0]
});

@@ -149,3 +138,3 @@ });

if (xmlobj.Upload) {
toArray(xmlobj.Upload).forEach(function (upload) {
(0, _helpers.toArray)(xmlobj.Upload).forEach(function (upload) {
var key = upload.Key;

@@ -190,3 +179,3 @@ var uploadId = upload.UploadId;

if (xmlobj.Buckets.Bucket) {
toArray(xmlobj.Buckets.Bucket).forEach(function (bucket) {
(0, _helpers.toArray)(xmlobj.Buckets.Bucket).forEach(function (bucket) {
var name = bucket.Name;

@@ -217,3 +206,3 @@ var creationDate = new Date(bucket.CreationDate);

if (events) {
toArray(events).forEach(function (s3event) {
(0, _helpers.toArray)(events).forEach(function (s3event) {
result.push(s3event);

@@ -231,11 +220,11 @@ });

if (filters) {
filters = toArray(filters);
filters = (0, _helpers.toArray)(filters);
if (filters[0].S3Key) {
filters[0].S3Key = toArray(filters[0].S3Key);
filters[0].S3Key = (0, _helpers.toArray)(filters[0].S3Key);
if (filters[0].S3Key[0].FilterRule) {
toArray(filters[0].S3Key[0].FilterRule).forEach(function (rule) {
var Name = toArray(rule.Name)[0];
var Value = toArray(rule.Value)[0];
(0, _helpers.toArray)(filters[0].S3Key[0].FilterRule).forEach(function (rule) {
var Name = (0, _helpers.toArray)(rule.Name)[0];
var Value = (0, _helpers.toArray)(rule.Value)[0];
result.push({

@@ -257,5 +246,5 @@ Name,

if (xmlobj.TopicConfiguration) {
toArray(xmlobj.TopicConfiguration).forEach(function (config) {
var Id = toArray(config.Id)[0];
var Topic = toArray(config.Topic)[0];
(0, _helpers.toArray)(xmlobj.TopicConfiguration).forEach(function (config) {
var Id = (0, _helpers.toArray)(config.Id)[0];
var Topic = (0, _helpers.toArray)(config.Topic)[0];
var Event = genEvents(config.Event);

@@ -274,5 +263,5 @@ var Filter = genFilterRules(config.Filter);

if (xmlobj.QueueConfiguration) {
toArray(xmlobj.QueueConfiguration).forEach(function (config) {
var Id = toArray(config.Id)[0];
var Queue = toArray(config.Queue)[0];
(0, _helpers.toArray)(xmlobj.QueueConfiguration).forEach(function (config) {
var Id = (0, _helpers.toArray)(config.Id)[0];
var Queue = (0, _helpers.toArray)(config.Queue)[0];
var Event = genEvents(config.Event);

@@ -291,5 +280,5 @@ var Filter = genFilterRules(config.Filter);

if (xmlobj.CloudFunctionConfiguration) {
toArray(xmlobj.CloudFunctionConfiguration).forEach(function (config) {
var Id = toArray(config.Id)[0];
var CloudFunction = toArray(config.CloudFunction)[0];
(0, _helpers.toArray)(xmlobj.CloudFunctionConfiguration).forEach(function (config) {
var Id = (0, _helpers.toArray)(config.Id)[0];
var CloudFunction = (0, _helpers.toArray)(config.CloudFunction)[0];
var Event = genEvents(config.Event);

@@ -330,7 +319,7 @@ var Filter = genFilterRules(config.Filter);

if (xmlobj.IsTruncated) result.isTruncated = xmlobj.IsTruncated;
if (xmlobj.NextPartNumberMarker) result.marker = +toArray(xmlobj.NextPartNumberMarker)[0];
if (xmlobj.NextPartNumberMarker) result.marker = +(0, _helpers.toArray)(xmlobj.NextPartNumberMarker)[0];
if (xmlobj.Part) {
toArray(xmlobj.Part).forEach(function (p) {
var part = +toArray(p.PartNumber)[0];
(0, _helpers.toArray)(xmlobj.Part).forEach(function (p) {
var part = +(0, _helpers.toArray)(p.PartNumber)[0];
var lastModified = new Date(p.LastModified);

@@ -367,4 +356,4 @@ var etag = p.ETag.replace(/^"/g, '').replace(/"$/g, '').replace(/^"/g, '').replace(/"$/g, '').replace(/^"/g, '').replace(/"$/g, '');

if (xmlobj.Location) {
var location = toArray(xmlobj.Location)[0];
var bucket = toArray(xmlobj.Bucket)[0];
var location = (0, _helpers.toArray)(xmlobj.Location)[0];
var bucket = (0, _helpers.toArray)(xmlobj.Bucket)[0];
var key = xmlobj.Key;

@@ -382,4 +371,4 @@ var etag = xmlobj.ETag.replace(/^"/g, '').replace(/"$/g, '').replace(/^"/g, '').replace(/"$/g, '').replace(/^"/g, '').replace(/"$/g, '');

if (xmlobj.Code && xmlobj.Message) {
var errCode = toArray(xmlobj.Code)[0];
var errMessage = toArray(xmlobj.Message)[0];
var errCode = (0, _helpers.toArray)(xmlobj.Code)[0];
var errMessage = (0, _helpers.toArray)(xmlobj.Message)[0];
return {

@@ -405,5 +394,5 @@ errCode,

var name = toArray(Key)[0];
var lastModified = new Date(toArray(LastModified)[0]);
var etag = (0, _helpers.sanitizeETag)(toArray(ETag)[0]);
var name = (0, _helpers.sanitizeObjectKey)((0, _helpers.toArray)(Key)[0]);
var lastModified = new Date((0, _helpers.toArray)(LastModified)[0]);
var etag = (0, _helpers.sanitizeETag)((0, _helpers.toArray)(ETag)[0]);
return {

@@ -432,4 +421,4 @@ name,

if (responseEntity) {
toArray(responseEntity).forEach(function (commonPrefix) {
var prefix = toArray(commonPrefix.Prefix)[0];
(0, _helpers.toArray)(responseEntity).forEach(function (commonPrefix) {
var prefix = (0, _helpers.toArray)(commonPrefix.Prefix)[0];
result.objects.push({

@@ -452,6 +441,6 @@ prefix,

if (listBucketResult.Contents) {
toArray(listBucketResult.Contents).forEach(function (content) {
var name = toArray(content.Key)[0];
var lastModified = new Date(toArray(content.LastModified)[0]);
var etag = (0, _helpers.sanitizeETag)(toArray(content.ETag)[0]);
(0, _helpers.toArray)(listBucketResult.Contents).forEach(function (content) {
var name = (0, _helpers.sanitizeObjectKey)((0, _helpers.toArray)(content.Key)[0]);
var lastModified = new Date((0, _helpers.toArray)(content.LastModified)[0]);
var etag = (0, _helpers.sanitizeETag)((0, _helpers.toArray)(content.ETag)[0]);
var size = content.Size;

@@ -480,3 +469,3 @@ result.objects.push({

if (listVersionsResult.Version) {
toArray(listVersionsResult.Version).forEach(function (content) {
(0, _helpers.toArray)(listVersionsResult.Version).forEach(function (content) {
result.objects.push(formatObjInfo(content));

@@ -487,3 +476,3 @@ });

if (listVersionsResult.DeleteMarker) {
toArray(listVersionsResult.DeleteMarker).forEach(function (content) {
(0, _helpers.toArray)(listVersionsResult.DeleteMarker).forEach(function (content) {
result.objects.push(formatObjInfo(content, {

@@ -532,4 +521,4 @@ IsDeleteMarker: true

if (xmlobj.Contents) {
toArray(xmlobj.Contents).forEach(function (content) {
var name = content.Key;
(0, _helpers.toArray)(xmlobj.Contents).forEach(function (content) {
var name = (0, _helpers.sanitizeObjectKey)((0, _helpers.toArray)(content.Key)[0]);
var lastModified = new Date(content.LastModified);

@@ -548,4 +537,4 @@ var etag = (0, _helpers.sanitizeETag)(content.ETag);

if (xmlobj.CommonPrefixes) {
toArray(xmlobj.CommonPrefixes).forEach(function (commonPrefix) {
var prefix = toArray(commonPrefix.Prefix)[0];
(0, _helpers.toArray)(xmlobj.CommonPrefixes).forEach(function (commonPrefix) {
var prefix = (0, _helpers.toArray)(commonPrefix.Prefix)[0];
var size = 0;

@@ -579,4 +568,4 @@ result.objects.push({

if (xmlobj.Contents) {
toArray(xmlobj.Contents).forEach(function (content) {
var name = content.Key;
(0, _helpers.toArray)(xmlobj.Contents).forEach(function (content) {
var name = (0, _helpers.sanitizeObjectKey)(content.Key);
var lastModified = new Date(content.LastModified);

@@ -588,3 +577,3 @@ var etag = (0, _helpers.sanitizeETag)(content.ETag);

if (content.UserMetadata != null) {
metadata = toArray(content.UserMetadata)[0];
metadata = (0, _helpers.toArray)(content.UserMetadata)[0];
} else {

@@ -605,4 +594,4 @@ metadata = null;

if (xmlobj.CommonPrefixes) {
toArray(xmlobj.CommonPrefixes).forEach(function (commonPrefix) {
var prefix = toArray(commonPrefix.Prefix)[0];
(0, _helpers.toArray)(xmlobj.CommonPrefixes).forEach(function (commonPrefix) {
var prefix = (0, _helpers.toArray)(commonPrefix.Prefix)[0];
var size = 0;

@@ -696,3 +685,3 @@ result.objects.push({

role: xmlObj.ReplicationConfiguration.Role,
rules: toArray(xmlObj.ReplicationConfiguration.Rule)
rules: (0, _helpers.toArray)(xmlObj.ReplicationConfiguration.Rule)
}

@@ -699,0 +688,0 @@ };

{
"name": "minio",
"version": "7.0.24",
"version": "7.0.25",
"description": "S3 Compatible Cloud Storage client",

@@ -38,2 +38,3 @@ "main": "./dist/main/minio.js",

"browser-or-node": "^1.3.0",
"crypto-browserify": "^3.12.0",
"es6-error": "^4.1.1",

@@ -40,0 +41,0 @@ "fast-xml-parser": "^3.17.5",

Sorry, the diff of this file is too big to display

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