Package: python-django / 1.4.5-1+deb7u16
Metadata
Package | Version | Patches format |
---|---|---|
python-django | 1.4.5-1+deb7u16 | 3.0 (quilt) |
Patch series
view the series filePatch | File delta | Description |
---|---|---|
02_disable sources in sphinxdoc.diff | (download) |
docs/conf.py |
5 4 + 1 - 0 ! |
disable creation of _sources directory by sphinx We do this to save some space as the sources of the documentation are not really useful in a binary package. . This is a Debian specific patch. |
03_manpage.diff | (download) |
docs/man/django-admin.1 |
6 3 + 3 - 0 ! |
update manual page to refer to django-admin instead of django-admin.py Update the manual page to speak of django-admin instead of django-admin.py as that's the name used by the Debian package. . This is a Debian specific patch. |
06_use_debian_geoip_database_as_default.diff | (download) |
django/contrib/gis/geoip/base.py |
20 11 + 9 - 0 ! |
use debian geoip database path as default Default to Debian standard path for GeoIP directory and for GeoIP city file. Avoids the need to declare them in each project. . This is a Debian specific patch. Bug-Debian: http://bugs.debian.org/645094 |
is_safe_url 1.4.diff | (download) |
django/contrib/auth/tests/views.py |
8 6 + 2 - 0 ! |
possible xss via ``is_safe_url`` A common pattern in Django applications is for a view to accept, via querystring parameter, a URL to redirect to upon successful completion of the view's processing. This pattern is used in code bundled with Django itself; for example, the ``login`` view in ``django.contrib.auth.views``, which accepts such a parameter to determine where to send a user following successful login. A utility function -- ``django.utils.http.is_safe_url()`` -- is provided and used to validate that this URL is on the current host (either via fully-qualified or relative URL), so as to avoid potentially dangerous redirects from maliciously-constructed querystrings. The ``is_safe_url()`` function works as intended for HTTP and HTTPS URLs, but due to the manner in which it parses the URL, will permit redirects to other schemes, such as ``javascript:``. While the Django project is unaware of any demonstrated ability to perform cross-site scripting attacks via this mechanism, the potential for such is sufficient to trigger a security response. To remedy this issue, the ``is_safe_url()`` function will be modified to properly recognize and reject URLs which specify a scheme other than HTTP or HTTPS. |
uri fix.diff | (download) |
tests/modeltests/validation/tests.py |
2 1 + 1 - 0 ! |
use name that won't resolve in tests. |
ssi tag 1.4.diff | (download) |
django/template/defaulttags.py |
2 2 + 0 - 0 ! |
directory traversal with ``ssi`` template tag Django's template language includes two methods of including and rendering one template inside another: 1. The ``{% include %}`` tag takes a template name, and uses Django's template loading mechanism (which is restricted to the directories specified in the ``TEMPLATE_DIRS`` setting, as with any other normal template load in Django). 2. The ``{% ssi %}`` tag, which takes a file path and includes that file's contents (optionally parsing and rendering it as a template). Since the ``ssi`` tag is not restricted to ``TEMPLATE_DIRS``, it represents a security risk; the setting ``ALLOWED_INCLUDE_ROOTS`` thus is required, and specifies filesystem locations from which ``ssi`` may read files. To remedy this, the ``ssi`` tag will now use Python's ``os.path.abspath`` to determine the absolute path of the file, and whether it is actually located within a directory permitted by ``ALLOWED_INCLUDE_ROOTS``. |
password dos.diff | (download) |
django/contrib/auth/forms.py |
51 37 + 14 - 0 ! |
ensure that passwords are never long enough for a dos. * Limit the password length to 4096 bytes * Password hashers will raise a ValueError * django.contrib.auth forms will fail validation * Document in release notes that this is a backwards incompatible change Thanks to Josh Wright for the report, and Donald Stufft for the patch. Some changes were stripped from this patch since they also apply fixes to UnsaltedSHA1PasswordHasher which is not shipped in the version of Django in Debian. |
password 2.5 compat.diff | (download) |
django/contrib/auth/tests/hashers.py |
18 9 + 9 - 0 ! |
removed usage of b"" string syntax for python 2.5 compatibility. |
reverse execution 1.4.x.patch | (download) |
django/core/urlresolvers.py |
22 21 + 1 - 0 ! |
unexpected code execution using ``reverse()`` Django's URL handling is based on a mapping of regex patterns (representing the URLs) to callable views, and Django's own processing consists of matching a requested URL against those patterns to determine the appropriate view to invoke. Django also provides a convenience function -- ``django.core.urlresolvers.reverse()`` -- which performs this process in the opposite direction. The ``reverse()`` function takes information about a view, and returns a URL which would invoke that view. Use of ``reverse()`` is encouraged for application developers, as the output of ``reverse()`` is always based on the current URL patterns, meaning developers do not need to change other code when making changes to URLs. One argument signature for ``reverse()`` is to pass a dotted Python path to the desired view. In this situation, Django will import the module indicated by that dotted path as part of generating the rsulting URL. If such a module has import-time side effects, those side effects will occur. Thus it is possible for an attacker to cause unexpected code execution, given the following conditions: 1. One or more views are present which construct a URL based on user input (commonly, a "next" parameter in a querystring indicating where to redirect upon successful completion of an action). 2. One or more modules known to an attacker to exist on the server's Python import path, which perform code execution with side effects on importing. To remedy this, ``reverse()`` will now only accept and import dotted paths based on the view-containing modules listed in the project's URL pattern configuration, so as to ensure that only modules the developer intended to be imported in this fashion can or will be imported. |
cache csrf 1.4.x.patch | (download) |
django/middleware/cache.py |
10 9 + 1 - 0 ! |
prevent leaking the csrf token through caching. Django includes both a caching framework and a system for preventing cross-site request forgery (CSRF) attacks. The CSRF-protection system is based on a random nonce sent to the client in a cookie which must be sent by the client on future requests, and in forms a hidden value which must be submitted back with the form. The caching framework includes an option to cache responses to anonymous (i.e., unauthenticated) clients. When the first anonymous request to a given page was by a client which did not have a CSRF cookie, the cache framework will also cache the CSRF cookie, and serve the same nonce to other anonymous clients who do not have a CSRF cookie. This allows an attacker to obtain a valid CSRF cookie value and perform attacks which bypass the check for the cookie. To remedy this, the caching framework will no longer cache such responses. The heuristic for this will be: 1. If the incoming request did not submit any cookies, and 2. The response did send one or more cookies, and 3. The ``Vary: Cookie`` header is set on the response, then the response will not be cached. |
mysql typecast 1.4.x.diff | (download) |
django/db/models/fields/__init__.py |
16 15 + 1 - 0 ! |
mysql typecasting protection The MySQL database is known to "typecast" on certain queries; for example, when querying a table which contains string values, but using a query which filters based on an integer value, MySQL will first silently coerce the strings to integers, and return a result based on that. Django's model field classes are aware of their own types, and most such classes perform explicit conversion of query arguments to the correct database-level type before querying. However, three model field classes did not correctly convert their arguments: * ``FilePathField`` * ``GenericIPAddressField`` * ``IPAddressField`` These three fields have been updated to convert their arguments to the correct types before querying. Additionally, developers of custom model fields are now warned via documentation to ensure their custom field classes will perform appropriate type conversions, and users of the ``raw()`` and ``extra()`` query methods -- which allow the developer to supply raw SQL or SQL fragments -- will be advised to ensure they perform appropriate manual type conversions prior to executing queries. |
2601.patch | (download) |
django/core/urlresolvers.py |
4 4 + 0 - 0 ! |
fixed #22486: reverse raises attributeerror on partial functions. Create the lookup_str from the original function whenever a partial is provided as an argument to a url pattern. |
is_safe_url_1_4.diff | (download) |
django/contrib/auth/tests/views.py |
12 8 + 4 - 0 ! |
malformed urls from user input incorrectly validated (cve-2014-3730) The validation for redirects did not correctly validate some malformed URLs, which are accepted by some browsers. This allows a user to be redirected to an unsafe URL unexpectedly. Django relies on user input in some cases (e.g. :func:`django.contrib.auth.views.login`, ``django.contrib.comments``, and :doc:`i18n </topics/i18n/index>`) to redirect the user to an "on success" URL. The security checks for these redirects (namely ``django.util.http.is_safe_url()``) did not correctly validate some malformed URLs, such as `http:\\\\\\djangoproject.com`, which are accepted by some browsers with more liberal URL parsing. To remedy this, the validation in ``is_safe_url()`` has been tightened to be able to handle and correctly validate these malformed URLs. |
drop_fix_ie_for_vary_1_4.diff | (download) |
django/core/handlers/base.py |
2 0 + 2 - 0 ! |
caches may be allowed to store and serve private data (cve-2014-1418) In certain situations, Django may allow caches to store private data related to a particular session and then serve that data to requests |
FTBFS exception in servers tests tear down.patch | (download) |
tests/regressiontests/servers/tests.py |
2 2 + 0 - 0 ! |
fix exception in servers tests tear down |
admin data leak 1.4.diff | (download) |
django/contrib/admin/exceptions.py |
6 6 + 0 - 0 ! |
--- |
file upload 1.4.diff | (download) |
django/core/files/storage.py |
11 5 + 6 - 0 ! |
--- |
remote user 1.4.diff | (download) |
django/contrib/auth/middleware.py |
28 25 + 3 - 0 ! |
--- |
reverse 1.4.diff | (download) |
django/core/urlresolvers.py |
2 2 + 0 - 0 ! |
--- |
CVE 2015 0219.diff | (download) |
django/core/servers/basehttp.py |
11 11 + 0 - 0 ! |
--- |
CVE 2015 0219 fix.diff | (download) |
django/core/servers/basehttp.py |
33 0 + 33 - 0 ! |
[patch] [1.4.x] fixed #24238 -- removed unused WSGIRequestHandler.get_environ() Also moved the test as it wasn't running. |
CVE 2015 0220.diff | (download) |
django/utils/http.py |
1 1 + 0 - 0 ! |
--- |
CVE 2015 0221.diff | (download) |
django/views/static.py |
7 5 + 2 - 0 ! |
--- |
CVE 2015 0221 regression fix.diff | (download) |
django/middleware/gzip.py |
25 17 + 8 - 0 ! |
--- |
CVE 2015 2317.diff | (download) |
django/utils/http.py |
9 8 + 1 - 0 ! |
[patch] [1.4.x] made is_safe_url() reject urls that start with control characters. This is a security fix; disclosure to follow shortly. |
session 1.4.x.diff | (download) |
django/contrib/sessions/backends/cache.py |
6 4 + 2 - 0 ! |
--- |
newlines 1.4.x.diff | (download) |
django/core/validators.py |
26 15 + 11 - 0 ! |
--- |
session store 1.4.x.diff | (download) |
django/contrib/sessions/backends/base.py |
9 8 + 1 - 0 ! |
--- |
date leak 1.4.x.diff | (download) |
django/utils/formats.py |
20 20 + 0 - 0 ! |
--- |
CVE 2016 2512.diff | (download) |
django/contrib/auth/tests/views.py |
8 7 + 1 - 0 ! |
cve-2016-2512: prevented spoofing is_safe_url() with basic auth |
CVE 2016 2512 regression.diff | (download) |
django/utils/http.py |
6 5 + 1 - 0 ! |
is_safe_url() crashes with a byestring url on python 2 |
CVE 2016 2513.diff | (download) |
django/contrib/auth/hashers.py |
65 63 + 2 - 0 ! |
cve-2016-2513: fixed user enumeration timing attack during login |