===========================Django 1.4.21 release notes===========================*July 8, 2015*Django 1.4.21 fixes several security issues in 1.4.20.Denial-of-service possibility by filling session store======================================================In previous versions of Django, the session backends created a new empty recordin the session storage anytime ``request.session`` was accessed and there was asession key provided in the request cookies that didn't already have a sessionrecord. This could allow an attacker to easily create many new session recordssimply by sending repeated requests with unknown session keys, potentiallyfilling up the session store or causing other users' session records to beevicted.The built-in session backends now create a session record only if the sessionis actually modified; empty session records are not created. Thus thispotential DoS is now only possible if the site chooses to expose asession-modifying view to anonymous users.As each built-in session backend was fixed separately (rather than a fix in thecore sessions framework), maintainers of third-party session backends shouldcheck whether the same vulnerability is present in their backend and correctit if so.Header injection possibility since validators accept newlines in input======================================================================Some of Django's built-in validators(:class:`~django.core.validators.EmailValidator`, most seriously) didn'tprohibit newline characters (due to the usage of ``$`` instead of ``\Z`` in theregular expressions). If you use values with newlines in HTTP response or emailheaders, you can suffer from header injection attacks. Django itself isn'tvulnerable because :class:`~django.http.HttpResponse` and the mail sendingutilities in :mod:`django.core.mail` prohibit newlines in HTTP and SMTPheaders, respectively. While the validators have been fixed in Django, ifyou're creating HTTP responses or email messages in other ways, it's a goodidea to ensure that those methods prohibit newlines as well. You might alsowant to validate that any existing data in your application doesn't containunexpected newlines.:func:`~django.core.validators.validate_ipv4_address`,:func:`~django.core.validators.validate_slug`, and:class:`~django.core.validators.URLValidator` and their usage in thecorresponding form fields ``GenericIPAddresseField``, ``IPAddressField``,``SlugField``, and ``URLField`` are also affected.The undocumented, internally unused ``validate_integer()`` function is nowstricter as it validates using a regular expression instead of simply castingthe value using ``int()`` and checking if an exception was raised.