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

@baiducloud/sdk

Package Overview
Dependencies
Maintainers
5
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@baiducloud/sdk - npm Package Compare versions

Comparing version 1.0.0-rc.30 to 1.0.0-rc.31

8

CHANGELOG.md
# CHANGELOG
## 1.0.0-rc.31(2021-08-13)
### Fix
- BOSClient: add key valiation in getObject() & getObjectToFile() method;
- empty key is not allowed
- consecutive forward slashes (/) are not allowed in key
- forward slash (/) and a backslash (\\) are not allowed at head or tail
- consecutive periods (..) are not allowed in sub-path
## 1.0.0-rc.30(2021-08-03)

@@ -4,0 +12,0 @@ ### Fix

2

package.json
{
"name": "@baiducloud/sdk",
"version": "1.0.0-rc.30",
"version": "1.0.0-rc.31",
"description": "Baidu Cloud Engine JavaScript SDK",

@@ -5,0 +5,0 @@ "main": "./index.js",

@@ -20,3 +20,3 @@ Baidu Cloud Engine JavaScript SDK

```html
<script src="https://code.bdstatic.com/npm/@baiducloud/sdk@1.0.0-rc.30/dist/baidubce-sdk.bundle.min.js" ></script>
<script src="https://code.bdstatic.com/npm/@baiducloud/sdk@1.0.0-rc.31/dist/baidubce-sdk.bundle.min.js" ></script>
```

@@ -508,2 +508,15 @@ /**

BosClient.prototype.getObject = function (bucketName, key, range, options) {
if (!key) {
throw new TypeError('key should not be empty.');
}
else if (/\/\/+/.test(key)) {
throw new TypeError('key should not contain consecutive forward slashes (/).');
}
else if (/^[/\\]/.test(key) || /[/\\]$/.test(key)) {
throw new TypeError('key should not start or end with a forward slash (/) or a backslash (\\).');
}
else if (/\/\.\.\//.test(key)) {
throw new TypeError('path in key should not contain consecutive periods (..).');
}
options = options || {};

@@ -527,2 +540,15 @@

BosClient.prototype.getObjectToFile = function (bucketName, key, filename, range, options) {
if (!key) {
throw new TypeError('key should not be empty.');
}
else if (/\/\/+/.test(key)) {
throw new TypeError('key should not contain consecutive forward slashes (/).');
}
else if (/^[/\\]/.test(key) || /[/\\]$/.test(key)) {
throw new TypeError('key should not start or end with a forward slash (/) or a backslash (\\).');
}
else if (/\/\.\.\//.test(key)) {
throw new TypeError('path in key should not contain consecutive periods (..).');
}
options = options || {};

@@ -529,0 +555,0 @@

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

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