From 6b6db2d6b3515433d91631baf02327ae891a43ef Mon Sep 17 00:00:00 2001 From: mr-n30 <69602501+mr-n30@users.noreply.github.com> Date: Wed, 16 Aug 2023 15:29:29 -0500 Subject: [PATCH] Update jwk.py Fix for `Information Disclosure` vulnerability --- jose/jwk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jose/jwk.py b/jose/jwk.py index 7afc0547..2a318475 100644 --- a/jose/jwk.py +++ b/jose/jwk.py @@ -71,9 +71,9 @@ def construct(key_data, algorithm=None): algorithm = key_data.get("alg", None) if not algorithm: - raise JWKError("Unable to find an algorithm for key: %s" % key_data) + raise JWKError("Unable to find an algorithm for key") key_class = get_key(algorithm) if not key_class: - raise JWKError("Unable to find an algorithm for key: %s" % key_data) + raise JWKError("Unable to find an algorithm for key") return key_class(key_data, algorithm)