Skip to content

Commit 7569fdf

Browse files
authored
Merge pull request #63 from sirosen/fix-cve-2017-11424
Fix for CVE-2017-11424
2 parents b54c12a + 5bc7470 commit 7569fdf

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
sudo: false
2+
# Travis infra requires pinning dist:precise, at least as of 2017-09-01
3+
# detail: https://blog.travis-ci.com/2017-06-21-trusty-updates-2017-Q2-launch
4+
dist: precise
25
language: python
36
python:
47
- "2.6"

jose/jwk.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def __init__(self, key, algorithm):
105105

106106
invalid_strings = [
107107
b'-----BEGIN PUBLIC KEY-----',
108+
b'-----BEGIN RSA PUBLIC KEY-----',
108109
b'-----BEGIN CERTIFICATE-----',
109110
b'ssh-rsa'
110111
]

tests/algorithms/test_HMAC.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ def test_RSA_key(self):
1717
with pytest.raises(JOSEError):
1818
HMACKey(key, ALGORITHMS.HS256)
1919

20+
key = "-----BEGIN RSA PUBLIC KEY-----"
21+
with pytest.raises(JOSEError):
22+
HMACKey(key, ALGORITHMS.HS256)
23+
2024
key = "-----BEGIN CERTIFICATE-----"
2125
with pytest.raises(JOSEError):
2226
HMACKey(key, ALGORITHMS.HS256)

0 commit comments

Comments
 (0)