summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2021-04-26 14:42:14 +0200
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2021-04-27 09:59:05 +0200
commitb3a9fa345d87331ff0a5819436ce7603e34ee9bb (patch)
tree25ca6a12cd67714016c9ca96a1a25d3eab993d9a /framework
parent6aecdd7b791a06b827ad2c5f64f7f3f9cd787c2b (diff)
framework/replay: Quote resource names before signing
Per the S3 documentation, resource names will be quoted when signing on the host side. So do the same in the client so the signatures can match. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/520>
Diffstat (limited to 'framework')
-rw-r--r--framework/replay/download_utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/replay/download_utils.py b/framework/replay/download_utils.py
index 3bc682600..bc0225c6c 100644
--- a/framework/replay/download_utils.py
+++ b/framework/replay/download_utils.py
@@ -32,7 +32,7 @@ import xml.etree.ElementTree as ET
from os import path
from time import time
from email.utils import formatdate
-from urllib.parse import urlparse
+from requests.utils import requote_uri
from framework import core, exceptions
from framework.replay.options import OPTIONS
@@ -92,7 +92,7 @@ def get_authorization_headers(url, resource):
to_sign = "GET\n\n\n%s\nx-amz-security-token:%s\n/%s/%s" % (date,
minio_token,
OPTIONS.download['minio_bucket'],
- resource)
+ requote_uri(resource))
signature = sign_with_hmac(minio_secret, to_sign)
headers = {'Host': OPTIONS.download['minio_host'],