Skip to content

Conversation

@jkwlui
Copy link
Member

@jkwlui jkwlui commented Oct 28, 2019

Fixes #859 🦕

Made changes to how signed URLs (v2 and v4) are url-encoded:

  1. encodeURIComponent does not encode the following characters: ! * ' ( ), which should have been encoded.
  2. Slashes / in the object's (file) name should not have been encoded. (caused issue fix(deps): update dependency date-and-time to ^0.10.0 #857)

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 28, 2019
@codecov
Copy link

codecov bot commented Oct 29, 2019

Codecov Report

Merging #905 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #905      +/-   ##
==========================================
+ Coverage   95.36%   95.39%   +0.03%     
==========================================
  Files          11       11              
  Lines        1230     1239       +9     
  Branches      307      308       +1     
==========================================
+ Hits         1173     1182       +9     
  Misses         29       29              
  Partials       28       28
Impacted Files Coverage Δ
src/file.ts 98.19% <100%> (-0.01%) ⬇️
src/util.ts 100% <100%> (ø) ⬆️

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 a74a3ca...7ac116e. Read the comment docs.

@jkwlui jkwlui requested a review from a team October 30, 2019 20:31
@alexander-fenster
Copy link
Contributor

It makes me really uncomfortable to see custom non-standard encoding implementation. Where is the documentation that explains how the encoding should work? It should be mentioned in the code comment if it exists.

Copy link
Contributor

@frankyn frankyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a system test to confirm with GCS backend. Other than that LGTM.

@jkwlui jkwlui mentioned this pull request Oct 31, 2019
2 tasks
Copy link

@bcoe bcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the comment.

Copy link
Contributor

@frankyn frankyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jkwlui!

@jkwlui jkwlui merged commit ba41517 into master Oct 31, 2019
@jkwlui jkwlui deleted the fix-url-encode branch October 31, 2019 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

getSignedUrl with cname results in SignatureDoesNotMatch error

5 participants