diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2011-06-20 15:19:28 -0400 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2011-06-20 15:19:28 -0400 |
| commit | bdb34fbeb6fbd42a972dc97c8772445f7c2e1161 (patch) | |
| tree | 70afc54911aaadcf1780bd110fba22b12ea8661b | |
| parent | 18c24610ad691d16fa0f00e3f3674fb9d401097d (diff) | |
| download | passlib-bdb34fbeb6fbd42a972dc97c8772445f7c2e1161.tar.gz | |
minor fixes
| -rw-r--r-- | passlib/handlers/ldap_digests.py | 2 | ||||
| -rw-r--r-- | passlib/tests/test_apache.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/passlib/handlers/ldap_digests.py b/passlib/handlers/ldap_digests.py index 3694b75..6711b8b 100644 --- a/passlib/handlers/ldap_digests.py +++ b/passlib/handlers/ldap_digests.py @@ -57,7 +57,7 @@ class _Base64DigestHelper(uh.StaticHandler): if hash is not None and not cls.identify(hash): raise ValueError("not a %s hash" % (cls.name,)) chk = cls._hash_func(secret).digest() - hash = cls.ident + b64encode(chk).decode("ascii").strip() + hash = cls.ident + b64encode(chk).decode("ascii") return to_hash_str(hash) class _SaltedBase64DigestHelper(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): diff --git a/passlib/tests/test_apache.py b/passlib/tests/test_apache.py index 5576dc9..6fce388 100644 --- a/passlib/tests/test_apache.py +++ b/passlib/tests/test_apache.py @@ -380,7 +380,7 @@ class HtdigestFileTest(TestCase): #check returns bytes if encoding explicitly disabled ht = apache.HtdigestFile(path, encoding=None) self.assertIsInstance(ht.realms()[0], bytes) - self.assertIsInstance(ht.users("realm")[0], bytes) + self.assertIsInstance(ht.users(b("realm"))[0], bytes) #check sample utf-8 set_file(path, self.sample_04_utf8) |
