django1/django/utils
Ade Lee d10c7bfe56 Fixed #28401 -- Allowed hashlib.md5() calls to work with FIPS kernels.
md5 is not an approved algorithm in FIPS mode, and trying to instantiate
a hashlib.md5() will fail when the system is running in FIPS mode.

md5 is allowed when in a non-security context. There is a plan to add a
keyword parameter (usedforsecurity) to hashlib.md5() to annotate whether
or not the instance is being used in a security context.

In the case where it is not, the instantiation of md5 will be allowed.
See https://bugs.python.org/issue9216 for more details.

Some downstream python versions already support this parameter. To
support these versions, a new encapsulation of md5() has been added.
This encapsulation will pass through the usedforsecurity parameter in
the case where the parameter is supported, and strip it if it is not.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-10-12 08:58:27 +02:00
..
translation Refs #32355 -- Used @functools.lru_cache as a straight decorator. 2021-09-27 09:10:58 +02:00
__init__.py
_os.py Refs #30461 -- Added django.utils._os.to_path(). 2019-08-13 17:17:39 +02:00
archive.py Fixed CVE-2021-3281 -- Fixed potential directory-traversal via archive.extract(). 2021-02-01 09:07:36 +01:00
asyncio.py Optimized @async_unsafe. 2021-09-30 12:16:00 +02:00
autoreload.py Fixed #33027 -- Made autoreloader pass -X options. 2021-09-29 11:37:50 +02:00
baseconv.py Fixed #32712 -- Deprecated django.utils.baseconv module. 2021-05-07 11:57:40 +02:00
cache.py Fixed #28401 -- Allowed hashlib.md5() calls to work with FIPS kernels. 2021-10-12 08:58:27 +02:00
connection.py Fixed #32233 -- Cleaned-up duplicate connection functionality. 2020-12-08 08:55:44 +01:00
crypto.py Fixed #28401 -- Allowed hashlib.md5() calls to work with FIPS kernels. 2021-10-12 08:58:27 +02:00
datastructures.py Optimized handling case-insensitive mappings. 2021-09-22 09:26:21 +02:00
dateformat.py Refs #32956 -- Corrected spelling of daylight saving time. 2021-08-06 13:00:24 +02:00
dateparse.py Fixed #32904 -- Made parse_time() more strict. 2021-07-07 12:08:43 +02:00
dates.py Fixed #28798 -- Removed unused django.utils.dates.WEEKDAYS_REV, MONTHS_3_REV. 2017-11-17 15:37:58 -05:00
datetime_safe.py Fixed #32738 -- Deprecated django.utils.datetime_safe module. 2021-05-12 14:42:17 +02:00
deconstruct.py Refs #27656 -- Updated django.utils docstring verbs according to PEP 257. 2017-02-11 16:11:08 -05:00
decorators.py Fixed #31224 -- Added support for asynchronous views and middleware. 2020-03-18 19:59:12 +01:00
deprecation.py Advanced deprecation warnings for Django 4.1. 2021-09-20 21:23:01 +02:00
duration.py Fixed #28926 -- Fixed loss of precision of big DurationField values on SQLite and MySQL. 2017-12-28 17:35:41 -05:00
encoding.py Fixed typos in comments and docs. 2021-05-29 12:51:14 +02:00
feedgenerator.py Fixed 32956 -- Lowercased spelling of "web" and "web framework" where appropriate. 2021-07-29 06:24:12 +02:00
formats.py Refs #32355 -- Used @functools.lru_cache as a straight decorator. 2021-09-27 09:10:58 +02:00
functional.py Refs #32508 -- Raised ValueError instead of using "assert" in lazy(). 2021-03-15 13:10:30 +01:00
hashable.py Refs #29838, Refs #28507 -- Made make_hashable() ignore key order. 2020-10-05 20:42:46 +02:00
html.py Fixed #32866 -- Fixed trimming trailing punctuation from escaped string in urlize(). 2021-07-07 11:19:33 +02:00
http.py Fixed #32366 -- Updated datetime module usage to recommended approach. 2021-05-12 11:08:41 +02:00
inspect.py Refs #31732 -- Fixed django.utils.inspect caching for bound methods. 2021-03-22 13:17:54 +01:00
ipv6.py Refs #27656 -- Updated django.utils docstring verbs according to PEP 257. 2017-02-11 16:11:08 -05:00
itercompat.py Refs #27656 -- Updated django.utils docstring verbs according to PEP 257. 2017-02-11 16:11:08 -05:00
jslex.py Fixed capitalization of "ECMAScript" and "JavaScript". 2021-04-29 20:29:08 +02:00
log.py Refs #32880 -- Moved logging reference to new document. 2021-06-30 07:21:52 +02:00
lorem_ipsum.py Refs #27656 -- Updated django.utils docstring verbs according to PEP 257. 2017-02-11 16:11:08 -05:00
module_loading.py Refs #33107 -- Optimized cached_import() helper. 2021-10-04 07:47:49 +02:00
numberformat.py Fixed #28280 -- Prevented numberformat.format() from formatting large/tiny floats in scientific notation. 2020-02-26 16:02:53 +01:00
regex_helper.py Refs #30899 -- Made _lazy_re_compile() support bytes. 2019-10-29 09:14:24 +01:00
safestring.py Fixed outdated import in django/utils/safestring.py. 2019-12-06 09:31:33 +01:00
termcolors.py Fixed typo in django/utils/termcolors.py docstring. 2019-12-27 07:49:15 +01:00
text.py Fixed #32859 -- Simplified compress_string() by using gzip.compress(). 2021-06-21 13:19:11 +02:00
timesince.py Fixed #31937 -- Eased translation of time strings in some languages. 2021-04-10 20:23:12 +02:00
timezone.py Refs #32355 -- Used @functools.lru_cache as a straight decorator. 2021-09-27 09:10:58 +02:00
topological_sort.py Fixed E128, E741 flake8 warnings. 2020-05-12 08:52:23 +02:00
tree.py Refs #32940 -- Removed unnecessary branch in Node.add(). 2021-07-20 07:19:28 +02:00
version.py Refs #32355 -- Used @functools.lru_cache as a straight decorator. 2021-09-27 09:10:58 +02:00
xmlutils.py Fixed #30159 -- Removed unneeded use of OrderedDict. 2019-02-06 13:48:39 -05:00