# Web Security
# vurnabilities
- Session Hijacking
- Cache Poisoning
- Cross site request forgery CSRF
- Cross Site scripting XSS
- Clickjacking
- SQL Injection
- Cross Origin Resource Sharing CORS (opens new window)
# Securoty Features
- Session Security
# Security Concepts
# What is a Session? (opens new window)
HTTP session token - generated by server and sent to client
-
- sessionID cookie is hidden from HTTP/js world
In django,
django.contrib.sessions.middleware.SessionMiddleware
Session database
backends.base.SessionBase
Request session in views,
request.session
dictionary type DS
# HTTP cookie
- Server -> Browser using set-cookie header (opens new window)
- Browser(for all subsequent requests) -> Server
do not leak the cookie at client using HTTPOnly (opens new window)