summaryrefslogtreecommitdiff
path: root/django/middleware
AgeCommit message (Collapse)Author
2015-06-27Fixed #25017 -- Allowed customizing the DISALLOWED_USER_AGENTS responsesujayskumar
2015-05-13Removed unnecessary arguments in .get method callsPiotr Jakimiak
2015-05-02Fixed #24696 -- Made CSRF_COOKIE computation lazy.Jay Cox
Only compute the CSRF_COOKIE when it is actually used. This is a significant speedup for clients not using cookies. Changed result of the “test_token_node_no_csrf_cookie” test: It gets a valid CSRF token now which seems like the correct behavior. Changed auth_tests.test_views.LoginTest.test_login_csrf_rotate to use get_token() to trigger CSRF cookie inclusion instead of changing request.META["CSRF_COOKIE_USED"] directly.
2015-04-21Fixed #24681 -- Removed Unicode bug in BrokenLinkEmailMiddlewareOliver A Bristow
2015-03-26Fixed #19910 -- Added slash to i18n redirect if APPEND_SLASH is set.Bas Peschier
This introduces a force_append_slash argument for request.get_full_path() which is used by RedirectFallbackMiddleware and CommonMiddleware when handling redirects for settings.APPEND_SLASH.
2015-03-18Fixed #23960 -- Removed http.fix_location_headerClaude Paroz
Thanks Carl Meyer for the report and Tim Graham for the review.
2015-03-05Fixed #21495 -- Added settings.CSRF_HEADER_NAMEGrzegorz Slusarek
2015-03-02Fixed #24360 -- Delayed internal LocaleMiddleware variable initializationClaude Paroz
Failing in a middleware `__init__` is preventing proper debug view.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-01Removed UpdateCacheMiddleware._session_accessed()Tim Graham
This method is unused since f567d04b249913db4a37adab8ba521cdc974d423
2015-01-29Fixed #24145 -- Added PUT & PATCH to CommonMiddleware APPEND_SLASH redirect ↵Samuel Colvin
error.
2015-01-06Fixed #23815 -- Prevented UnicodeDecodeError in CSRF middlewareClaude Paroz
Thanks codeitloadit for the report, living180 for investigations and Tim Graham for the review.
2014-11-04Fixed #23531 -- Added CommonMiddleware.response_redirect_class.Berker Peksag
2014-09-12Fixed #17101 -- Integrated django-secure and added check --deploy optionTim Graham
Thanks Carl Meyer for django-secure and for reviewing. Thanks also to Zach Borboa, Erik Romijn, Collin Anderson, and Jorge Carleitao for reviews.
2014-08-14Fixed #21579 -- Made LocaleMiddleware respect script prefix.Tim Graham
Thanks buettgenbach at datacollect.com for the report and patch.
2014-06-25Fixed #20128 -- Made CsrfViewMiddleware ignore IOError when reading POST data.Tim Graham
Thanks Walter Doekes.
2014-06-13Fixed #22440 -- Updated ConditionalGetMiddleware to comply with RFC 2616.Mark Lavin
2014-06-10Fixed #17552 -- Removed a hack for IE6 and earlier.Aymeric Augustin
It prevented the GZipMiddleware from compressing some data types even on more recent version of IE where the corresponding bug was fixed. Thanks Aaron Cannon for the report and Tim Graham for the review.
2014-05-28Fixed several typos in DjangoAlex Gaynor
2014-04-21Prevented leaking the CSRF token through caching.Aymeric Augustin
This is a security fix. Disclosure will follow shortly.
2014-03-30Corrected many style guide violations that the newest version of flake8 catchesAlex Gaynor
2014-03-21Removed django.middleware.doc. Refs #20126.Aymeric Augustin
Small doc changes missed in 66076268.
2014-03-21Removed legacy transaction management per the deprecation timeline.Aymeric Augustin
2014-03-21Removed settings.CACHE_MIDDLEWARE_ANONYMOUS_ONLY per deprecation timeline.Tim Graham
refs #15201.
2014-03-21Removed settings.SEND_BROKEN_LINK_EMAILS per deprecation timeline.Tim Graham
2014-03-08Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
2014-03-06Fixed #22185 -- Added settings.CSRF_COOKIE_AGERoger Hu
Thanks Paul McMillan for the review.
2014-02-26Fixed #21389 -- Accept most valid language codesBouke Haarsma
By removing the 'supported' keyword from the detection methods and only relying on a cached settings.LANGUAGES, the speed of said methods has been improved; around 4x raw performance. This allows us to stop checking Python's incomplete list of locales, and rely on a less restrictive regular expression for accepting certain locales. HTTP Accept-Language is defined as being case-insensitive, based on this fact extra performance improvements have been made; it wouldn't make sense to check for case differences.
2013-12-12Fixed #21473 -- Limited language preservation to logoutLudwik Trammer
Current language is no longer saved to session by LocaleMiddleware on every response (the behavior introduced in #14825). Instead language stored in session is reintroduced into new session after logout. Forward port of c558a43fd6 to master.
2013-11-28Fixed E125 pep8 warningsChristopher Medrela
2013-11-23Fixed #21012 -- New API to access cache backends.Curtis Maloney
Thanks Curtis Malony and Florian Apolloner. Squashed commit of the following: commit 3380495e93f5e81b80a251b03ddb0a80b17685f5 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 14:18:07 2013 +0100 Looked up the template_fragments cache at runtime. commit 905a74f52b24a198f802520ff06290a94dedc687 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 14:19:48 2013 +0100 Removed all uses of create_cache. Refactored the cache tests significantly. Made it safe to override the CACHES setting. commit 35e289fe9285feffed3c60657af9279a6a2cfccc Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 12:23:57 2013 +0100 Removed create_cache function. commit 8e274f747a1f1c0c0e6c37873e29067f7fa022e8 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 12:04:52 2013 +0100 Updated docs to describe a simplified cache backend API. commit ee7eb0f73e6d4699edcf5d357dce715224525cf6 Author: Curtis Maloney <curtis@tinbrain.net> Date: Sat Oct 19 09:49:24 2013 +1100 Fixed #21012 -- Thread-local caches, like databases.
2013-11-03Fixed flake8 E251 violationsMilton Mazzarri
2013-11-02Fixed all E261 warningscoagulant
2013-11-02More attacking E302 violatorsAlex Gaynor
2013-11-02Fixed #21302 -- Fixed unused imports and import *.Tim Graham
2013-11-02Fixed #21324 -- Translate CSRF failure viewBouke Haarsma
Thanks to Claude Paroz for the original patch.
2013-10-22Fixed #5789 -- Changed LocaleMiddleware session variable to '_language'.Bouke Haarsma
The old 'django_language' variable will still be read from in order to migrate users. The backwards-compatability shim will be removed in Django 1.8. Thanks to jdunck for the report and stugots for the initial patch.
2013-10-21Fixed #21288 -- Fixed E126 pep8 warningsAlasdair Nicol
2013-10-18Fixed bug causing CSRF token not to rotate on login.Tim Graham
Thanks Gavin McQuillan for the report.
2013-10-15Fixed #7603 -- Added a 'scheme' property to the HttpRequest objectUnai Zalakain
`HttpRequest.scheme` is `https` if `settings.SECURE_PROXY_SSL_HEADER` is appropriately set and falls back to `HttpRequest._get_scheme()` (a hook for subclasses to implement) otherwise. `WSGIRequest._get_scheme()` makes use of the `wsgi.url_scheme` WSGI environ variable to determine the request scheme. `HttpRequest.is_secure()` simply checks if `HttpRequest.scheme` is `https`. This provides a way to check the current scheme in templates, for example. It also allows us to deal with other schemes. Thanks nslater for the suggestion.
2013-10-10Used "is" for comparisons with None.Tim Graham
2013-10-03Fixed #19277 -- Added LocaleMiddleware.response_redirect_classEmil Stenström
Thanks ppetrid at yawd.eu for the suggestion.
2013-08-04Deprecated SortedDict (replaced with collections.OrderedDict)Curtis Maloney
Thanks Loic Bistuer for the review.
2013-06-29Advanced deprecation warnings for Django 1.7.Aymeric Augustin
2013-06-19Removed several unused imports.Aymeric Augustin
2013-05-26Replaced `and...or...` constructs with PEP 308 conditional expressions.Ramiro Morales
2013-05-25Fixed #20099 -- Eased subclassing of BrokenLinkEmailsMiddlewareClaude Paroz
Thanks Ram Rachum for the report and the initial patch, and Simon Charette for the review.
2013-05-25Fixed #14825 -- LocaleMiddleware keeps languageVlastimil Zíma
* LocaleMiddleware stores language into session if it is not present there.
2013-05-24Rotate CSRF token on loginAndrew Godwin
2013-05-19Fixed #20126 -- XViewMiddleware moved to django.contrib.admindocs.middlewareŁukasz Langa