@smithy/signature-v4 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +2 -1
- package/dist-es/SignatureV4.js +2 -1
- package/package.json +1 -1
package/dist-cjs/index.js
CHANGED
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
35
35
|
// src/SignatureV4.ts
|
|
36
36
|
|
|
37
37
|
var import_util_middleware = require("@smithy/util-middleware");
|
|
38
|
+
|
|
38
39
|
var import_util_utf84 = require("@smithy/util-utf8");
|
|
39
40
|
|
|
40
41
|
// src/constants.ts
|
|
@@ -540,7 +541,7 @@ ${(0, import_util_hex_encoding.toHex)(hashedRequest)}`;
|
|
|
540
541
|
}
|
|
541
542
|
}
|
|
542
543
|
const normalizedPath = `${(path == null ? void 0 : path.startsWith("/")) ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && (path == null ? void 0 : path.endsWith("/")) ? "/" : ""}`;
|
|
543
|
-
const doubleEncoded =
|
|
544
|
+
const doubleEncoded = (0, import_util_uri_escape.escapeUri)(normalizedPath);
|
|
544
545
|
return doubleEncoded.replace(/%2F/g, "/");
|
|
545
546
|
}
|
|
546
547
|
return path;
|
package/dist-es/SignatureV4.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { toHex } from "@smithy/util-hex-encoding";
|
|
2
2
|
import { normalizeProvider } from "@smithy/util-middleware";
|
|
3
|
+
import { escapeUri } from "@smithy/util-uri-escape";
|
|
3
4
|
import { toUint8Array } from "@smithy/util-utf8";
|
|
4
5
|
import { ALGORITHM_IDENTIFIER, ALGORITHM_QUERY_PARAM, AMZ_DATE_HEADER, AMZ_DATE_QUERY_PARAM, AUTH_HEADER, CREDENTIAL_QUERY_PARAM, EVENT_ALGORITHM_IDENTIFIER, EXPIRES_QUERY_PARAM, MAX_PRESIGNED_TTL, SHA256_HEADER, SIGNATURE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, TOKEN_HEADER, TOKEN_QUERY_PARAM, } from "./constants";
|
|
5
6
|
import { createScope, getSigningKey } from "./credentialDerivation";
|
|
@@ -158,7 +159,7 @@ ${toHex(hashedRequest)}`;
|
|
|
158
159
|
}
|
|
159
160
|
}
|
|
160
161
|
const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`;
|
|
161
|
-
const doubleEncoded =
|
|
162
|
+
const doubleEncoded = escapeUri(normalizedPath);
|
|
162
163
|
return doubleEncoded.replace(/%2F/g, "/");
|
|
163
164
|
}
|
|
164
165
|
return path;
|
package/package.json
CHANGED