A Shield to protect against xss
Project description
## Badges
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
# XSS Shield
The primary objective of xss shield is to find the possible xss attack and block the request or return None. As xss is one the most common bug in web applications security researchers a finding ways to prevent it and hackers are creating more advanced payloads. most modern frameworks prevents xss by escaping special characters but still xss can be found. as react and djangos jinja2 tamplate engine does escapes the special characters but injecting user inputs in href attr {{ }} can be possible to exploit xss.
## Usages
You can use the shield as a middleware by adding it into the settings.py middleware list
MIDDLEWARE = [
‘shield.middleware.XssShieldMiddleware’,
]
Or you can use it as filter to where you want to senitize
{% load shield_tag %}
it has two filters one to senitize the value for not injecting as javascript: or data: URI variables
{{ data|protect }}
The other process bruteforcess through a list of event handlers which is possible to lead into xss
{{ data|bruter }} Thats much simple it is :)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-xss-shield-1.0.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28a7adb45d5fa6f7b8dffe41f027491b94a0aca28fb28c4b83056411b378c751 |
|
MD5 | ae78ec5ed2bb7c3e98ad70e42d3694b0 |
|
BLAKE2b-256 | 1db42b075c14a8438cba7c67d7d80da3c806d0bade08e8770dd2cde031cd7122 |