Closed andydunstall closed 1 year ago
Patch coverage has no change and project coverage change: -0.14%
:warning:
Comparison is base (
bb725aa
) 76.34% compared to head (4df6b96
) 76.21%. Report is 3 commits behind head on master.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Tested with:
redis-cli save
redis-cli save backup-{timestamp}
redis-cli save &&&
redis-cli save adsf!@#123
redis-cli save foo:bar
Got ya. Then let's use absl::StrAppendFormat()
On Thu, Sep 7, 2023, 12:51 PM Andy Dunstall @.***> wrote:
@.**** commented on this pull request.
In util/cloud/aws.cc https://github.com/romange/helio/pull/135#discussion_r1318368095:
- c == '-' ||
- c == '.' ||
- c == '_' ||
- c == '~'
- ); +}
+// Escapes the given path as documented by +// https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html. +std::string AwsEscapePath(const std::string_view& path, bool encode_sep) {
- std::string escaped;
- for (char c : path) {
- if (!AwsIsEscaped(c) || (c == '/' && !encode_sep)) {
- escaped.push_back(c);
- } else {
- escaped += absl::StrFormat("%%%02X", c);
Trying that absl::Hex returns lowercase though we need uppercase to match the signature
— Reply to this email directly, view it on GitHub https://github.com/romange/helio/pull/135#discussion_r1318368095, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4BFCGG3MCF6PSW2I77IFDXZGKIJANCNFSM6AAAAAA4ORLIBE . You are receiving this because your review was requested.Message ID: @.***>
Then let's use absl::StrAppendFormat()
Ok sure updated
Fixes https://github.com/dragonflydb/controlplane/issues/225, where if the bucket or key includes a character that AWS expects to be URL encoded, the signature will be invalid
AWS defines their own URL path encoding in https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html:
This implementation is ported from the Go SDK https://github.com/aws/aws-sdk-go/blob/main/private/protocol/rest/build.go#L261