diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2020-05-12 12:11:57 -0400 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2020-05-12 12:11:57 -0400 |
commit | c8d8ad8e90dac480b8c5ab1019266b34026b9b30 (patch) | |
tree | eeb7d97b312e6a69f662a6aa833c3c91ec36c01c /docs/history | |
parent | cfdce7ee2911d90c2b4204d67e741ad9dd6b4e69 (diff) | |
download | passlib-c8d8ad8e90dac480b8c5ab1019266b34026b9b30.tar.gz |
bugfix: bcrypt os_crypt backend: fix some more crypt.crypt() utf8 encoding issues
which were causing it to fail to generate a hash.
bcrypt
------
* _norm_digest(): fixed some PasslibValueError()s being thrown by os_crypt
backend during UT fuzz verifier. These were due to non-UTF8 input
being provided to crypt.crypt()... even though secret itself was UTF8 safe!
This was because secret was being truncated/repeated as part of
various backend bug workarounds; and the truncate/repeat operations
weren't being done in manner that respected UTF8 character boundaries.
This has now been fixed via _require_valid_utf8_bytes flag
(which has been set for os_crypt backend), that enables
utf8-safe mode of operation.
utils
-----
* added utf8_truncate() and utf8_repeat_string() helpers, for bcrypt fixes above.
* simplified repeat_string() internals
Diffstat (limited to 'docs/history')
-rw-r--r-- | docs/history/1.7.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/history/1.7.rst b/docs/history/1.7.rst index 12eb363..6497550 100644 --- a/docs/history/1.7.rst +++ b/docs/history/1.7.rst @@ -62,6 +62,8 @@ Other Changes These can't be passed through, due to limitation in stdlib's :func:`!crypt.crypt`. (Prior to this release, it would it incorrectly raise :exc:`~passlib.exc.MissingBackendError` instead). + Also improved legacy bcrypt format workarounds, to support a few more UTF8 edge cases than before. + * Modified some internals to help run on FIPS systems (:issue:`116`): In particular, when MD5 hash is not available, :class:`~passlib.hash.hex_md5` |