Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use lowercase header when calculating signatures #910

Merged
merged 2 commits into from
Dec 25, 2020

Conversation

beajer
Copy link
Contributor

@beajer beajer commented Dec 11, 2020

No description provided.

@codecov
Copy link

codecov bot commented Dec 11, 2020

Codecov Report

Merging #910 (ef044b0) into develop (3775dc4) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #910      +/-   ##
===========================================
+ Coverage    93.72%   93.74%   +0.02%     
===========================================
  Files           88       89       +1     
  Lines         2660     2670      +10     
===========================================
+ Hits          2493     2503      +10     
  Misses         167      167              
Impacted Files Coverage Δ
lib/common/signUtils.js 82.14% <100.00%> (+0.21%) ⬆️
lib/common/utils/createRequest.js 96.55% <100.00%> (ø)
lib/common/utils/lowercaseKeyHeader.js 100.00% <100.00%> (ø)
lib/object.js 96.40% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3775dc4...ef044b0. Read the comment docs.

@PeterRao PeterRao merged commit 8e1adfd into develop Dec 25, 2020
@beajer beajer deleted the fix/lowercase_header branch January 5, 2021 08:31
PeterRao added a commit that referenced this pull request Jan 6, 2021
* feat: support non-english http header (#842)

* feat: support non-english http header

* test: Add test cases for non-English request header information

* feat: add headerEncoding option

* feat: add encoder types

* fix: remove object spread syntax

Co-authored-by: biejia <wb-bj559483@alibaba-inc.com>

* fix(browser): checkpoint.file (#795)

* merge branch master into develop

* feat: inventory (#860)

* feat: worm (#857)

* feat: auto set stsConfig when sts expires (#856)

* feat: auto set stsConfig when sts expires

* test: add auto set sts test case

* fix: host err which old image client request (#869)

* fix: use put insteadof putStream when calling multipartUpload to process small file in browser (#890)

* fix(browser):setTimeout  has minimum time interval when tab is inactive (#887)

* fix: replace process for browser

* fix: use browserify options to replace process.js (#886)

Co-authored-by: beajer <919060679@qq.com>

* fix: merge conflict #726 (#892)

* fix: merge conflict

* test: ResponseTimeoutError

* fix: cannot use ali-oss in webworker (#823)

* feat: retry when net err or timeout (#876)

* feat: retry when net err or timeout

* test: should not retry when params.stream is not readable

* test: retry in browser

Co-authored-by: beajer <919060679@qq.com>

* fix: getBucketVersions should use NextKeyMarker property (#896)

* fix: getBucketVersions should use NextKeyMarker property

* docs: getBucketVersions should use NextKeyMarker property

* docs: Compatible wrong property

* Fix multipart upload (#895)

* fix: multipartUpload

zancun

* fix: test case

* test: multipartUploadStreams

* test: cov

* fix: error method

* fix: test and destory(err) when cancel

Co-authored-by: weiyie <912881342@qq.com>

* feat: listObjectsV2 (#888)

* feat: listObjectsV2

* style: trailingComma none

* fix: check region and endpoint for ssrf (#874)

* fix: check region and endpoint for ssrf

* fix: retry in browser

Co-authored-by: beajer <919060679@qq.com>

* use shime/url replace node-url to fix split regex bug

* fix: browser test and listV2 docs (#901)

* chore(release): 6.12.0

* chore: build 6.12.0

* fix: the continuation-token params in listV2 (#906)

* fix: the continuation-token params in listV2

* docs: update headers.Expires

* docs: revise `start-after` in listV2 (#907)

* fix: should use encodeURIComponent insteadof encodeURI in copy api (#914)

* fix: use lowercase header when calculating signatures (#910)

* fix: use lowercase header when calculating signatures

* fix: should throw error when neither bucket nor cname;  docs;

* fix(node): deepCopy not working for large Buffers (#909)

deepCopy does not work when copying an object
with a large Buffer (see test case).

This causes issues when using multipartUpload with the
`checkpoint` option: e.g.

```js
const file = Buffer.alloc(Math.pow(2, 30) - 1);
// throws RangeError in utils/deepCopy
multipartUpload("name", file, {checkpoint: {file, ...}});
```

* feat: prevent caching for the get api (#916)

* feat: prevent caching for the get api

* fix: support responseCacheControl for browser `get`

* fix: unnecessary query parameters

* fix: test case because Image Process updated compression algorithm

* fix: test case of buffer replication in Nodejs8

* fix: remove test.only

* fix: do not copy buffer in completeMultipartUpload (#915)

* fix: do not copy buffer in completeMultipartUpload

* fix: test case because Image Process updated compression algorithm

* fix: test case of buffer replication in Nodejs8

* fix: remove test.only

* fix: codecov

* fix: merge conflict from master

Co-authored-by: beajer <919060679@qq.com>
Co-authored-by: biejia <wb-bj559483@alibaba-inc.com>
Co-authored-by: 冷若霜寒 <912881342@qq.com>
Co-authored-by: Alois Klink <alois.klink@gmail.com>
PeterRao added a commit that referenced this pull request Jan 11, 2021
* chore: mege develop (#917)

* feat: support non-english http header (#842)

* feat: support non-english http header

* test: Add test cases for non-English request header information

* feat: add headerEncoding option

* feat: add encoder types

* fix: remove object spread syntax

Co-authored-by: biejia <wb-bj559483@alibaba-inc.com>

* fix(browser): checkpoint.file (#795)

* merge branch master into develop

* feat: inventory (#860)

* feat: worm (#857)

* feat: auto set stsConfig when sts expires (#856)

* feat: auto set stsConfig when sts expires

* test: add auto set sts test case

* fix: host err which old image client request (#869)

* fix: use put insteadof putStream when calling multipartUpload to process small file in browser (#890)

* fix(browser):setTimeout  has minimum time interval when tab is inactive (#887)

* fix: replace process for browser

* fix: use browserify options to replace process.js (#886)

Co-authored-by: beajer <919060679@qq.com>

* fix: merge conflict #726 (#892)

* fix: merge conflict

* test: ResponseTimeoutError

* fix: cannot use ali-oss in webworker (#823)

* feat: retry when net err or timeout (#876)

* feat: retry when net err or timeout

* test: should not retry when params.stream is not readable

* test: retry in browser

Co-authored-by: beajer <919060679@qq.com>

* fix: getBucketVersions should use NextKeyMarker property (#896)

* fix: getBucketVersions should use NextKeyMarker property

* docs: getBucketVersions should use NextKeyMarker property

* docs: Compatible wrong property

* Fix multipart upload (#895)

* fix: multipartUpload

zancun

* fix: test case

* test: multipartUploadStreams

* test: cov

* fix: error method

* fix: test and destory(err) when cancel

Co-authored-by: weiyie <912881342@qq.com>

* feat: listObjectsV2 (#888)

* feat: listObjectsV2

* style: trailingComma none

* fix: check region and endpoint for ssrf (#874)

* fix: check region and endpoint for ssrf

* fix: retry in browser

Co-authored-by: beajer <919060679@qq.com>

* use shime/url replace node-url to fix split regex bug

* fix: browser test and listV2 docs (#901)

* chore(release): 6.12.0

* chore: build 6.12.0

* fix: the continuation-token params in listV2 (#906)

* fix: the continuation-token params in listV2

* docs: update headers.Expires

* docs: revise `start-after` in listV2 (#907)

* fix: should use encodeURIComponent insteadof encodeURI in copy api (#914)

* fix: use lowercase header when calculating signatures (#910)

* fix: use lowercase header when calculating signatures

* fix: should throw error when neither bucket nor cname;  docs;

* fix(node): deepCopy not working for large Buffers (#909)

deepCopy does not work when copying an object
with a large Buffer (see test case).

This causes issues when using multipartUpload with the
`checkpoint` option: e.g.

```js
const file = Buffer.alloc(Math.pow(2, 30) - 1);
// throws RangeError in utils/deepCopy
multipartUpload("name", file, {checkpoint: {file, ...}});
```

* feat: prevent caching for the get api (#916)

* feat: prevent caching for the get api

* fix: support responseCacheControl for browser `get`

* fix: unnecessary query parameters

* fix: test case because Image Process updated compression algorithm

* fix: test case of buffer replication in Nodejs8

* fix: remove test.only

* fix: do not copy buffer in completeMultipartUpload (#915)

* fix: do not copy buffer in completeMultipartUpload

* fix: test case because Image Process updated compression algorithm

* fix: test case of buffer replication in Nodejs8

* fix: remove test.only

* fix: codecov

* fix: merge conflict from master

Co-authored-by: beajer <919060679@qq.com>
Co-authored-by: biejia <wb-bj559483@alibaba-inc.com>
Co-authored-by: 冷若霜寒 <912881342@qq.com>
Co-authored-by: Alois Klink <alois.klink@gmail.com>

* chrome: build

* fix: responseCacheControl in Node.js (#919)

* fix: responseCacheControl in Node.js

* fix: code specification

* chore(release): 6.13.1

* fix: failed browser test case

Co-authored-by: 饶培泽 <peizerao@gmail.com>
Co-authored-by: biejia <wb-bj559483@alibaba-inc.com>
Co-authored-by: 冷若霜寒 <912881342@qq.com>
Co-authored-by: Alois Klink <alois.klink@gmail.com>
PeterRao added a commit that referenced this pull request Jan 21, 2021
* chore: mege develop (#917)

* feat: support non-english http header (#842)

* feat: support non-english http header

* test: Add test cases for non-English request header information

* feat: add headerEncoding option

* feat: add encoder types

* fix: remove object spread syntax

Co-authored-by: biejia <wb-bj559483@alibaba-inc.com>

* fix(browser): checkpoint.file (#795)

* merge branch master into develop

* feat: inventory (#860)

* feat: worm (#857)

* feat: auto set stsConfig when sts expires (#856)

* feat: auto set stsConfig when sts expires

* test: add auto set sts test case

* fix: host err which old image client request (#869)

* fix: use put insteadof putStream when calling multipartUpload to process small file in browser (#890)

* fix(browser):setTimeout  has minimum time interval when tab is inactive (#887)

* fix: replace process for browser

* fix: use browserify options to replace process.js (#886)

Co-authored-by: beajer <919060679@qq.com>

* fix: merge conflict #726 (#892)

* fix: merge conflict

* test: ResponseTimeoutError

* fix: cannot use ali-oss in webworker (#823)

* feat: retry when net err or timeout (#876)

* feat: retry when net err or timeout

* test: should not retry when params.stream is not readable

* test: retry in browser

Co-authored-by: beajer <919060679@qq.com>

* fix: getBucketVersions should use NextKeyMarker property (#896)

* fix: getBucketVersions should use NextKeyMarker property

* docs: getBucketVersions should use NextKeyMarker property

* docs: Compatible wrong property

* Fix multipart upload (#895)

* fix: multipartUpload

zancun

* fix: test case

* test: multipartUploadStreams

* test: cov

* fix: error method

* fix: test and destory(err) when cancel

Co-authored-by: weiyie <912881342@qq.com>

* feat: listObjectsV2 (#888)

* feat: listObjectsV2

* style: trailingComma none

* fix: check region and endpoint for ssrf (#874)

* fix: check region and endpoint for ssrf

* fix: retry in browser

Co-authored-by: beajer <919060679@qq.com>

* use shime/url replace node-url to fix split regex bug

* fix: browser test and listV2 docs (#901)

* chore(release): 6.12.0

* chore: build 6.12.0

* fix: the continuation-token params in listV2 (#906)

* fix: the continuation-token params in listV2

* docs: update headers.Expires

* docs: revise `start-after` in listV2 (#907)

* fix: should use encodeURIComponent insteadof encodeURI in copy api (#914)

* fix: use lowercase header when calculating signatures (#910)

* fix: use lowercase header when calculating signatures

* fix: should throw error when neither bucket nor cname;  docs;

* fix(node): deepCopy not working for large Buffers (#909)

deepCopy does not work when copying an object
with a large Buffer (see test case).

This causes issues when using multipartUpload with the
`checkpoint` option: e.g.

```js
const file = Buffer.alloc(Math.pow(2, 30) - 1);
// throws RangeError in utils/deepCopy
multipartUpload("name", file, {checkpoint: {file, ...}});
```

* feat: prevent caching for the get api (#916)

* feat: prevent caching for the get api

* fix: support responseCacheControl for browser `get`

* fix: unnecessary query parameters

* fix: test case because Image Process updated compression algorithm

* fix: test case of buffer replication in Nodejs8

* fix: remove test.only

* fix: do not copy buffer in completeMultipartUpload (#915)

* fix: do not copy buffer in completeMultipartUpload

* fix: test case because Image Process updated compression algorithm

* fix: test case of buffer replication in Nodejs8

* fix: remove test.only

* fix: codecov

* fix: merge conflict from master

Co-authored-by: beajer <919060679@qq.com>
Co-authored-by: biejia <wb-bj559483@alibaba-inc.com>
Co-authored-by: 冷若霜寒 <912881342@qq.com>
Co-authored-by: Alois Klink <alois.klink@gmail.com>

* chrome: build

* fix: responseCacheControl in Node.js (#919)

* fix: responseCacheControl in Node.js

* fix: code specification

* chore(release): 6.13.1

* fix: failed browser test case

Co-authored-by: 饶培泽 <peizerao@gmail.com>
Co-authored-by: biejia <wb-bj559483@alibaba-inc.com>
Co-authored-by: 冷若霜寒 <912881342@qq.com>
Co-authored-by: Alois Klink <alois.klink@gmail.com>

Co-authored-by: beajer <919060679@qq.com>
Co-authored-by: biejia <wb-bj559483@alibaba-inc.com>
Co-authored-by: 冷若霜寒 <912881342@qq.com>
Co-authored-by: Alois Klink <alois.klink@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants