Skip to content
  • Eli Collins's avatar
    passlib.handlers: cases where crypt() returns malformed hash · 3ad926f481d1
    Eli Collins authored
    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.
    
    --HG--
    branch : stable
    3ad926f481d1
Loading