diff options
| author | José Padilla <jpadilla@webapplicate.com> | 2017-06-21 16:04:35 -0400 |
|---|---|---|
| committer | José Padilla <jpadilla@webapplicate.com> | 2017-06-21 16:04:35 -0400 |
| commit | 10b13525f51fe55872b789afa4215820d99d63dd (patch) | |
| tree | 48c82d466883497f39abef333c09836cde507b14 /tests/test_api_jwt.py | |
| parent | 1922f0972b065077404c0dafa0946f2132400a2b (diff) | |
| download | pyjwt-fix-vuln.tar.gz | |
Add warning when decoding with no algorithms specifiedfix-vuln
Diffstat (limited to 'tests/test_api_jwt.py')
| -rw-r--r-- | tests/test_api_jwt.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_api_jwt.py b/tests/test_api_jwt.py index 61de6e0..798e4b7 100644 --- a/tests/test_api_jwt.py +++ b/tests/test_api_jwt.py @@ -472,3 +472,13 @@ class TestJWT: secret, verify_expiration=True ) + + def test_decode_with_optional_algorithms(self, jwt, payload): + secret = 'secret' + jwt_message = jwt.encode(payload, secret) + + pytest.deprecated_call( + jwt.decode, + jwt_message, + secret + ) |
