Show More
@@ -28,15 +28,12 b' except:' | |||||
28 | import pickle |
|
28 | import pickle | |
29 |
|
29 | |||
30 | try: |
|
30 | try: | |
|
31 | # We are using compare_digest to limit the surface of timing attacks | |||
31 | from hmac import compare_digest |
|
32 | from hmac import compare_digest | |
32 | except ImportError: |
|
33 | except ImportError: | |
33 | # Python < 2.7.7 |
|
34 | # Python < 2.7.7: When digests don't match no feedback is provided, | |
34 | import warnings |
|
35 | # limiting the surface of attack | |
35 | warnings.warn("You are using Python older than 2.7.7, please consider " |
|
36 | def compare_digest(a,b): return a == b | |
36 | "updating to the latest version as it reduces a possible security" |
|
|||
37 | " vulnerability.") |
|
|||
38 | def compare_digest(a,b): |
|
|||
39 | return a == b |
|
|||
40 |
|
37 | |||
41 | import zmq |
|
38 | import zmq | |
42 | from zmq.utils import jsonapi |
|
39 | from zmq.utils import jsonapi |
General Comments 0
You need to be logged in to leave comments.
Login now