From 2a50928f27701212e05862376e9ab478d1a01654 Mon Sep 17 00:00:00 2001 From: Osma Ahvenlampi Date: Mon, 21 Aug 2023 05:24:47 +0300 Subject: [PATCH] Signatures need to use UTF-8 in order to represent all URLs (#633) --- core/signatures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/signatures.py b/core/signatures.py index f3fff81..90b611e 100644 --- a/core/signatures.py +++ b/core/signatures.py @@ -140,7 +140,7 @@ class HttpSignature: try: public_key_instance.verify( signature, - cleartext.encode("ascii"), + cleartext.encode("utf8"), padding.PKCS1v15(), hashes.SHA256(), ) @@ -229,7 +229,7 @@ class HttpSignature: ), ) signature = private_key_instance.sign( - signed_string.encode("ascii"), + signed_string.encode("utf8"), padding.PKCS1v15(), hashes.SHA256(), )