Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge from stable | Eli Collins | 2020-10-08 | 8 | -282/+652 |
|\ | | | | | | | | | | | | | As part of merge: * various: reverted the py26 compat fixes from rev 5e2f92012412 * test utils: stripped out "has_real_subtest" compat from rev c732a9e2a582, since now on py35+, which always has .subTest() method | ||||
| * | passlib.ext.django: refactored tests to give more granular results. | Eli Collins | 2020-10-07 | 2 | -200/+424 |
| | | | | | | | | | | | | | | | | | | | | | | | | * refactored DjangoBehaviorTest so instead of a monolothic "test_config()" method; there are now a bunch of different test methods. additionally, the ones with loops now use TestCase.subTest() to parameter things appropriately. *no changes to logic of the tests* * added TestCase.subTest() stub & wrapper to make debugging subtests easier. * added some documentation to test classes. | ||||
| * | passlib.ext.django: Updated UTs to work with latest django release | Eli Collins | 2020-10-07 | 3 | -61/+214 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (should fix long-standing issue 98) * test_ext_django: - Simplified "stock config" setup code. It now gets it's "sha_rounds" value from the django source, so we don't have to manually update it every time django changes their default. This should require less maintenance across minor django releases. (Should fix issue 98, and prevent recurrence) - Updated tests to account for quirks in how encoded hashes are handled. Specifically: None, "", and invalid hashes all cause subtly different behaviors across django versions. tests pass against django 1.8 - 3.1. - split "empty hash" test out from the loop it shared with "null hash" test, since the two behave differently. * tox: expanded envlist to explicitly test a bunch more django versions (1.8 - 3.1); and remove some needless "django 2.x + py2" tests * passlib.apps: reformatted django CryptContext declarations; added one for django 2.1 (which dropped "django_bcrypt" it's default list) * passlib.ext.django: - added internal "quirks" helper as central place to track minor edge-case changes between django versions. - passlib_to_django() helper now falls back to searching hasher classes directly, even if patch isn't installed. this allows it to work for django hashers that have been removed from django's default list. | ||||
| * | bugfix: python2.6 compat fixes -- a few "{}" set constructors slipped in. | Eli Collins | 2020-10-07 | 2 | -4/+9 |
| | | |||||
| * | bugfix: passlib.tests: revert filtering PasslibSecurityWarning in general; | Eli Collins | 2020-10-07 | 1 | -1/+2 |
| | | | | | | | | | | | | some tests depend on seeing it. (reverts change from rev be9a9121d5a7) | ||||
| * | passlib.context: now raises UnknownHashError() if hash can't be identified. | Eli Collins | 2020-10-07 | 4 | -27/+24 |
| | | | | | | | | this inherits from ValueError, and has same text, so backwards compatible. | ||||
* | | python compat cleanup -- replace stray ".im_func" refs | Eli Collins | 2020-10-06 | 2 | -10/+11 |
| | | |||||
* | | python compat cleanup -- use abc.ABC directly | Eli Collins | 2020-10-06 | 1 | -18/+5 |
| | | |||||
* | | python compat cleanup -- use magic super() calls | Eli Collins | 2020-10-06 | 36 | -114/+113 |
| | | |||||
* | | passlib.hash.bcrypt: remove support for "py-bcrypt" backend | Eli Collins | 2020-10-06 | 2 | -108/+1 |
| | | |||||
* | | passlib.hash.bcrypt: remove support for "bcryptor" backend | Eli Collins | 2020-10-06 | 3 | -67/+4 |
| | | |||||
* | | cleanup old python compat - assorted minor cleanups & fixes from conversion | Eli Collins | 2020-10-06 | 9 | -15/+20 |
| | | |||||
* | | cleanup old python compat -- removed int_types alias | Eli Collins | 2020-10-06 | 7 | -24/+20 |
| | | |||||
* | | cleanup old python compat -- removed join_byte_elems() and ↵ | Eli Collins | 2020-10-06 | 7 | -37/+23 |
| | | | | | | | | join_byte_values() wrappers | ||||
* | | cleanup old python compat -- removed iter_byte_values() wrapper | Eli Collins | 2020-10-06 | 2 | -9/+3 |
| | | |||||
* | | cleanup old python compat -- removed byte_elem_value() wrapper | Eli Collins | 2020-10-06 | 8 | -19/+12 |
| | | |||||
* | | cleanup old python compat -- removed str_to_usascii() wrapper | Eli Collins | 2020-10-06 | 10 | -28/+17 |
| | | |||||
* | | cleanup old python compat -- removed uascii_to_str() wrapper | Eli Collins | 2020-10-06 | 14 | -41/+33 |
| | | |||||
* | | cleanup old python compat -- removed u() wrapper from some regexes | Eli Collins | 2020-10-06 | 5 | -33/+22 |
| | | |||||
* | | cleanup old python compat -- replaced "unicode" alias in favor of "str" | Eli Collins | 2020-10-06 | 40 | -198/+180 |
| | | |||||
* | | cleanup old python compat -- unified "unicode_or_bytes" aliases | Eli Collins | 2020-10-06 | 7 | -26/+18 |
| | | |||||
* | | cleanup old python compat -- removed "unicode_or_str" and ↵ | Eli Collins | 2020-10-06 | 11 | -51/+40 |
| | | | | | | | | "native_string_types" aliases | ||||
* | | cleanup old python compat -- removed IO aliases (BytesIO etc) | Eli Collins | 2020-10-06 | 6 | -24/+14 |
| | | |||||
* | | cleanup old python compat -- removed suppress_cause() and error_from() wrappers | Eli Collins | 2020-10-06 | 9 | -36/+18 |
| | | |||||
* | | cleanup old python compat -- removed get_unbound_method_function() wrapper | Eli Collins | 2020-10-06 | 3 | -10/+3 |
| | | |||||
* | | cleanup old python compat -- removed OrderedDict backport | Eli Collins | 2020-10-06 | 3 | -253/+2 |
| | | |||||
* | | cleanup old python compat -- removed izip() wrapper | Eli Collins | 2020-10-06 | 3 | -15/+6 |
| | | |||||
* | | cleanup old python compat -- removed nextgetter() wrapper | Eli Collins | 2020-10-06 | 3 | -12/+4 |
| | | |||||
* | | cleanup old python compat -- removed itervalues() wrapper | Eli Collins | 2020-10-06 | 2 | -6/+2 |
| | | |||||
* | | cleanup old python compat -- removed iteritems() wrapper | Eli Collins | 2020-10-06 | 7 | -23/+19 |
| | | |||||
* | | cleanup old python compat -- removed imap() / lmap() aliases | Eli Collins | 2020-10-06 | 3 | -17/+7 |
| | | |||||
* | | cleanup old python compat -- removed irange() alias | Eli Collins | 2020-10-06 | 20 | -70/+58 |
| | | |||||
* | | cleanup old python compat -- removed some sys.version_info refs | Eli Collins | 2020-10-06 | 2 | -30/+6 |
| | | |||||
* | | cleanup old python compat -- removed PY2 & PY3 conditionals | Eli Collins | 2020-10-06 | 20 | -373/+127 |
| | | |||||
* | | cleanup old python compat -- removed PY26 conditional, and unittest2 imports. | Eli Collins | 2020-10-06 | 6 | -89/+16 |
| | | | | | | | | removing unittest2 also allowed removing "passlib.tests.backports" | ||||
* | | cleanup old python compat -- removed all "from __future__" imports | Eli Collins | 2020-10-06 | 34 | -34/+0 |
| | | |||||
* | | docs & setup: updates text & setup requirements to indicate we need minimum | Eli Collins | 2020-10-06 | 1 | -2/+2 |
| | | | | | | | | of Python 3.5. | ||||
* | | minor cleanups after merge -- removed some stray u() calls | Eli Collins | 2020-10-06 | 2 | -4/+4 |
| | | |||||
* | | Merge from stable | Eli Collins | 2020-10-06 | 31 | -337/+1719 |
|\ \ | |/ | |||||
| * | bumped to 1.7.3; updated docs for release1.7.3 | Eli Collins | 2020-10-06 | 1 | -1/+1 |
| | | |||||
| * | bugfix: passlib.utils: add stub safe_crypt() control flags when crypt() ↵ | Eli Collins | 2020-10-06 | 1 | -0/+3 |
| | | | | | | | | | | | | isn't available. (needed for windows) | ||||
| * | docs / sha crypt: commented out the "implicit_rounds" param in docs, | Eli Collins | 2020-10-06 | 1 | -16/+30 |
| | | | | | | | | | | it's not actually supported by using(), and isn't needed for users (issue 121) | ||||
| * | passlib.tests: silenced some internal warnings; fixed edge case in scrypt test; | Eli Collins | 2020-10-06 | 2 | -1/+4 |
| | | | | | | | | removed "gae" from tox suite (no meaningful difference from posix tests) | ||||
| * | passlib.tests.test_ext_django: cleaned up detection of missing django hasher ↵ | Eli Collins | 2020-10-06 | 4 | -12/+92 |
| | | | | | | | | | | | | backends; and some related helper methods. | ||||
| * | passlib.utils: add thread lock to fix some UT failures. | Eli Collins | 2020-10-05 | 3 | -6/+58 |
| | | |||||
| * | passlib.hash: added ldap_salted_sha256 & ldap_salted_512 (issue 124) | Eli Collins | 2020-10-05 | 5 | -6/+164 |
| | | |||||
| * | passlib.handlers: cases where crypt() returns malformed hash | Eli Collins | 2020-10-05 | 8 | -43/+99 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | now return a single unified InternalBackendError() class, instead of AssertionError. This change has a couple of parts: * assert statements replaced with permanent checks, since crypt() is unpredictable enough that we need to have this always on, even if production runs code in "-O2" mode. * added debug_only_repr() helper which allows including sensitive stuff like salts & hash digests within error tracebacks -- will only do so when global flag is enabled; and that's currently only set by unittest suite. * added new InternalBackendError() exception class (a RuntimeError subclass); which is raised instead of an AssertionError. | ||||
| * | passlib.handlers.bcrypt: safe_verify() calls should test for NotImplemented | Eli Collins | 2020-10-05 | 2 | -13/+13 |
| | | | | | | | | | | before boolean; bool(NotImplemented) is deprecated as of python 3.9 (fixes issue 125) | ||||
| * | utils.safe_crypt(): turns out pypy3's crypt() *does* support raw bytes. | Eli Collins | 2020-10-03 | 2 | -19/+50 |
| | | | | | | | | | | | | | | | | so instead of assuming safe_crypt() can only take UTF8 under py3, and anything under py2; code is now tied to "crypt_accepts_bytes" flag which does quick capability-detection when module loads. this updates the changes from rev 67c619208229 | ||||
| * | passlib.tests: silence some warnings, fix some MissingBackendError messages | Eli Collins | 2020-10-03 | 4 | -11/+22 |
| | | | | | | | | | | | | | | | | | | * tests now filter out some passlib deprecation warnings * bugfix: @doesnt_require_backend() decorator (rev XXX) now silences MissingBackendError exceptions thrown during HandlerCase.setUp() * simplified some monkeypatching within test_registry |