diff options
| author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-10-20 07:53:00 -0700 | 
|---|---|---|
| committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-10-20 07:53:00 -0700 | 
| commit | 75c024618951db12cb759825e21e7b95f41749af (patch) | |
| tree | d10a77615707d68e75166437a444e46423ab7cdf /cryptography | |
| parent | 962f66effa666c161aa93bb55b0f9c4deff67100 (diff) | |
| parent | 461c8d286d3cff4b5f5ed962669defa9710e7605 (diff) | |
| download | cryptography-75c024618951db12cb759825e21e7b95f41749af.tar.gz cryptography-75c024618951db12cb759825e21e7b95f41749af.tar.bz2 cryptography-75c024618951db12cb759825e21e7b95f41749af.zip  | |
Merge pull request #1421 from alex/fix-bug
Fixed an issue in fernet where the wrong exception would occur on an all-nulls input.
Diffstat (limited to 'cryptography')
| -rw-r--r-- | cryptography/fernet.py | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/cryptography/fernet.py b/cryptography/fernet.py index cdb9bdca..a8e0330e 100644 --- a/cryptography/fernet.py +++ b/cryptography/fernet.py @@ -90,7 +90,7 @@ class Fernet(object):          except (TypeError, binascii.Error):              raise InvalidToken -        if six.indexbytes(data, 0) != 0x80: +        if not data or six.indexbytes(data, 0) != 0x80:              raise InvalidToken          try:  | 
