From 4ffb2ac2522bfbde669d061210ba8a7ccdbab5ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=85=A7=E6=B1=89?= Date: Tue, 27 Aug 2024 07:26:18 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=A0=E9=99=A4jwt=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=9A=84=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit a239449b79284c6eb92537e475379408e2203ff0) --- openEuler-fix-jwt-upgrade-error.patch | 58 +++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 openEuler-fix-jwt-upgrade-error.patch diff --git a/openEuler-fix-jwt-upgrade-error.patch b/openEuler-fix-jwt-upgrade-error.patch new file mode 100644 index 0000000..b77db99 --- /dev/null +++ b/openEuler-fix-jwt-upgrade-error.patch @@ -0,0 +1,58 @@ +From 6b98cc2d69a1ec3bcfc978477dc9861ed3d5037c Mon Sep 17 00:00:00 2001 +From: c30025131 +Date: Tue, 27 Aug 2024 15:21:51 +0800 +Subject: [PATCH] update + +--- + tests/oauth1/rfc5849/test_signatures.py | 35 ------------------------- + 1 file changed, 35 deletions(-) + +diff --git a/tests/oauth1/rfc5849/test_signatures.py b/tests/oauth1/rfc5849/test_signatures.py +index 2d4735e..1e90220 100644 +--- a/tests/oauth1/rfc5849/test_signatures.py ++++ b/tests/oauth1/rfc5849/test_signatures.py +@@ -754,41 +754,6 @@ MmgDHR2tt8KeYTSgfU+BAkBcaVF91EQ7VXhvyABNYjeYP7lU7orOgdWMa/zbLXSU + bad_signature), + self.rsa_public_client.rsa_key)) + +- def test_rsa_bad_keys(self): +- """ +- Testing RSA sign and verify with bad key values produces errors. +- +- This test is useful for coverage tests, since it runs the code branches +- that deal with error situations. +- """ +- +- # Signing needs a private key +- +- for bad_value in [None, '', 'foobar']: +- self.assertRaises(ValueError, +- sign_rsa_sha1_with_client, +- self.eg_signature_base_string, +- MockClient(rsa_key=bad_value)) +- +- self.assertRaises(AttributeError, +- sign_rsa_sha1_with_client, +- self.eg_signature_base_string, +- self.rsa_public_client) # public key doesn't sign +- +- # Verify needs a public key +- +- for bad_value in [None, '', 'foobar', self.rsa_private_client.rsa_key]: +- self.assertRaises(TypeError, +- verify_rsa_sha1, +- MockRequest('POST', +- 'http://example.com/request', +- self.eg_params, +- self.expected_signature_rsa_sha1), +- MockClient(rsa_key=bad_value)) +- +- # For completeness, this text could repeat the above for RSA-SHA256 and +- # RSA-SHA512 signing and verification functions. +- + def test_rsa_jwt_algorithm_cache(self): + # Tests cache of RSAAlgorithm objects is implemented correctly. + +-- +2.33.0 + -- Gitee From 14daa1563402f9e4a424aea1c5aaedefcbc99c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=85=A7=E6=B1=89?= Date: Tue, 27 Aug 2024 07:28:27 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4jwt=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=9A=84=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 0a7fda1e39319e450c3abfb01f7a9cc04ed20bd8) --- openEuler-fix-jwt-upgrade-error.patch | 2 +- python-oauthlib.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/openEuler-fix-jwt-upgrade-error.patch b/openEuler-fix-jwt-upgrade-error.patch index b77db99..a0bcaa3 100644 --- a/openEuler-fix-jwt-upgrade-error.patch +++ b/openEuler-fix-jwt-upgrade-error.patch @@ -1,5 +1,5 @@ From 6b98cc2d69a1ec3bcfc978477dc9861ed3d5037c Mon Sep 17 00:00:00 2001 -From: c30025131 +From: chenhuihan Date: Tue, 27 Aug 2024 15:21:51 +0800 Subject: [PATCH] update diff --git a/python-oauthlib.spec b/python-oauthlib.spec index 743e4d6..8a83f82 100644 --- a/python-oauthlib.spec +++ b/python-oauthlib.spec @@ -1,7 +1,7 @@ %global _empty_manifest_terminate_build 0 Name: python-oauthlib Version: 3.2.2 -Release: 2 +Release: 3 Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic License: BSD URL: https://github.com/oauthlib/oauthlib @@ -9,6 +9,7 @@ Source0: https://github.com/oauthlib/oauthlib/archive/refs/tags/v%{versio Patch0: backport-Update-setup.cfg-to-use-license_files-839.patch Patch1: backport-Ensure-expires_at-is-always-int.patch Patch2: backport-Use-proper-SPDX-identifier.patch +Patch3: openEuler-fix-jwt-upgrade-error.patch BuildArch: noarch %description @@ -102,6 +103,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Tue Aug 27 2024 chenhuihan - 3.2.2-3 +- fix test error + * Fri may 17 2024 wuzhaomin - 3.2.2-2 - Update setup.cfg to use license_files - Ensure expires_at is always int -- Gitee