From f19139ab4c2fe62bcd5fbeeb2366afa5101b6981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Pedrosa?= Date: Mon, 28 Oct 2024 17:15:07 +0000 Subject: [PATCH 1/2] Fix bug where URL is being signed after being quoted --- opensearchpy/helpers/asyncsigner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opensearchpy/helpers/asyncsigner.py b/opensearchpy/helpers/asyncsigner.py index c045f1384..dd1935363 100644 --- a/opensearchpy/helpers/asyncsigner.py +++ b/opensearchpy/helpers/asyncsigner.py @@ -8,6 +8,7 @@ # GitHub history for details. from typing import Any, Dict, Optional, Union +from ..compat import unquote class AWSV4SignerAsyncAuth: @@ -56,7 +57,7 @@ def _sign_request( # create an AWS request object and sign it using SigV4Auth aws_request = AWSRequest( method=method, - url=url, + url=unquote(url), data=body, ) From 7c11911111d29e055010283728b664c53d198272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Pedrosa?= Date: Mon, 28 Oct 2024 17:19:11 +0000 Subject: [PATCH 2/2] Fix bug where URL is being signed after being quoted --- opensearchpy/helpers/asyncsigner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/opensearchpy/helpers/asyncsigner.py b/opensearchpy/helpers/asyncsigner.py index dd1935363..7008d984c 100644 --- a/opensearchpy/helpers/asyncsigner.py +++ b/opensearchpy/helpers/asyncsigner.py @@ -8,6 +8,7 @@ # GitHub history for details. from typing import Any, Dict, Optional, Union + from ..compat import unquote