summaryrefslogtreecommitdiff
path: root/passlib/exc.py
Commit message (Collapse)AuthorAgeFilesLines
* CryptPolicy deprecated, part2 - updated rest of library to use CryptContext ↵Eli Collins2012-04-171-2/+2
| | | | directly
* assorted bugfixes, tweaks, and tests added; based on coverage examinationEli Collins2012-04-121-7/+15
| | | | | | | * test os_crypt backend has functional fallback * test handler methods accept all unicode/bytes combinations for secret & hash * fixed some incorrect error messages & types being caught & raised * other minor cleanups
* ran full UTs, found and fixed a few bugs introduced in last few commits.Eli Collins2012-04-111-1/+1
|
* clarify behavior for secret=None and hash=NoneEli Collins2012-04-111-3/+11
| | | | | | | | | | | | | | | | | | | | | | | * passing a non-string secret or non-string hash to any CryptContext or handler method will now reliably result in a TypeError. previously, passing hash=None to many handler identify() and verify() methods would return False, while others would raise a TypeError. other handler methods would alternately throw ValueError or TypeError when passed a value that wasn't unicode or bytes. the various CryptContext methods also behaved inconsistently, depending on the behavior of the underlying handler. all of these behaviors are gone, they should all raise the same TypeError. * redid many of the from_string() methods to verify the hash type. * moved secret type & size validation to GenericHandler's encrypt/genhash/verify methods. this cheaply made the secret validation global to all hashes, and lets _calc_digest() implementations trust that the secret is valid. * updated the CryptContext and handler unittests to verify the above behavior is adhered to.
* passlib.exc: added constructors for common errors, should normalize error ↵Eli Collins2012-04-101-0/+54
| | | | messages
* *all* hashes now throw PasswordSizeError if password is larger than 4096 ↵Eli Collins2012-04-091-0/+22
| | | | chars; to prevent DOS issues.
* bcrypt workEli Collins2012-03-121-0/+8
| | | | | | | * added code to shoehorn $2$-support wrapper for bcryptor backend * added PasslibSecurityWarning when builtin backend is enabled (still considered whether it should be enabled by default) * py3 compat fix for repair_unused
* added some notesEli Collins2012-03-101-3/+6
|
* renamed passlib.exc warning classesEli Collins2012-02-081-2/+2
|
* split exceptions/warnings to separate module; added some additional warning ↵Eli Collins2012-01-181-0/+58
classes to make filtering easier