""" Cross Site Request Forgery Middleware. This module provides a middleware that implements protection against request forgeries from other sites. """ from django.conf import settings from django.http import HttpResponseForbidden import md5 import re import itertools _ERROR_MSG = '
Cross Site Request Forgery detected. Request aborted.
' _POST_FORM_RE = \ re.compile(r'(