diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2020-10-05 21:14:03 -0400 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2020-10-05 21:14:03 -0400 |
| commit | a2809fd98ed58eb006d204b05cc1519bdf1b12de (patch) | |
| tree | a6e47b8f2ddecf8a01aded663a151dacbef70b7a /passlib/utils | |
| parent | 0b6c5bdc88ace23e7f609ef9ef72da92495dddab (diff) | |
| download | passlib-a2809fd98ed58eb006d204b05cc1519bdf1b12de.tar.gz | |
passlib.handlers: cases where crypt() returns malformed hash
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.
Diffstat (limited to 'passlib/utils')
| -rw-r--r-- | passlib/utils/handlers.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/passlib/utils/handlers.py b/passlib/utils/handlers.py index 7e04114..f8681fa 100644 --- a/passlib/utils/handlers.py +++ b/passlib/utils/handlers.py @@ -346,7 +346,6 @@ def mask_value(value, show=4, pct=0.125, char=u"*"): show = min(show, int(size * pct)) return value[:show] + char * (size - show) - #============================================================================= # parameter helpers #============================================================================= |
