Skip to content

Sort querystring prior to signing#62

Merged
jkakar merged 1 commit intoaws-beam:masterfrom
onno-vos-dev:sort-query-string-before-signing
Jan 26, 2022
Merged

Sort querystring prior to signing#62
jkakar merged 1 commit intoaws-beam:masterfrom
onno-vos-dev:sort-query-string-before-signing

Conversation

@onno-vos-dev
Copy link
Copy Markdown
Member

@onno-vos-dev onno-vos-dev commented Jan 26, 2022

Without this fix, multipart uploading is still broken. This was not caught in previous tests as s3mock from Adobe apparently allows our request to go through without sorted querystring upon signing. In our staging and production system we only tested the create_multipart part of the multipart uploading flow without going all the way to the end.

Added a test that verifies that querystring must always be sorted.

Comment thread src/aws_request.erl
%% URL and query string as separate values.
split_url(URL) ->
URI = hackney_url:parse_url(URL),
%% FIXME(jkakar) Query string name/value pairs should be URL encoded
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This FIXME is what bit us in the end.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oops, sorry about that! ❤️

Copy link
Copy Markdown
Member

@jkakar jkakar 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 this!

Comment thread src/aws_request.erl
%% URL and query string as separate values.
split_url(URL) ->
URI = hackney_url:parse_url(URL),
%% FIXME(jkakar) Query string name/value pairs should be URL encoded
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oops, sorry about that! ❤️

@onno-vos-dev
Copy link
Copy Markdown
Member Author

@jkakar I lack merge rights, any chance you can merge it for me? 😊

@jkakar jkakar merged commit 40ce493 into aws-beam:master Jan 26, 2022
@onno-vos-dev
Copy link
Copy Markdown
Member Author

Thank you @jkakar <3

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.

4 participants