About Package
This Repo with include all security patches, That can be used to make django more secure against existing vulnerabilities.
Note This repo is not fully updated yet.
Installation
Install from Python packages repository:
pip install django-security-patch
Adding to Django Applications's settings.py file:
INSTALLED_APPS = (
...
'django_security_patch',
)
After Django 1.10, middleware modules can be added to MIDDLEWARE list in settings file:
MIDDLEWARE = [
...
'django_security_patch.middleware.QueryStringsSanitizer'
]
For Pre-Django 1.10, middleware modules can be added to MIDDLEWARE_CLASSES in settings.py file.
Description
One the leading vulnerabilities in current web application is Template Injeciton. For example
When u are using aa javascript library like Angularjs, You should be careful that data reflected
from user (from search box for example) will not be rendered in the context that there is another
template handler (like angularjs) which will lead to Template Injection.
for example user sends [[test]] via search box of django. this will of course will not create
any vulnerability for django, but if this value is rendered in template and there is angularjs,
it will give attacker to do some Client-side Attacks.
Usage
just install package and add this in your settings.py file:
QUERY_REMOVE_STRINGS = ['{{', '}}', '[[', ']]']
From now on, any query string in request.GET that includes this characters, will be replaced.
Metadata
Release files for django-security-patch 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-security-patch-0.0.3.tar.gz | 3.5 kB | Without provenance | Details for django-security-patch-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_security_patch-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for django_security_patch-0.0.3-py3-none-any.whl |
Total release size: 19.9 kB
Release files / django-security-patch-0.0.3.tar.gz
| Download URL | django-security-patch-0.0.3.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74042fca33bccca95b5613972c5e2d2f44693fa1f4ea1bbd02d98a3c6e9b44bb
|
|
BLAKE2b-256 checksum How to use checksums |
0c6e208585588c7302698c4624c5e8d06bec8ff0b2bfb6cb08b613d12d24241a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
|
Release files / django_security_patch-0.0.3-py3-none-any.whl
| Download URL | django_security_patch-0.0.3-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
655fcfaca44cb25793c65b864c4b1d81bc595d65c47c06cc0ff5c053833ad654
|
|
BLAKE2b-256 checksum How to use checksums |
5c83e8c17cd2a0d59ed3714bd220fa2e0549870f57917eb8668b382ae7eb4c54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
|
Security for django-security-patch 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.