ó
i4Vdc           @   sÉ   d  d l  m Z d d l m Z m Z m Z e d d d ƒZ e d d d ƒZ e d	 d d
 ƒZ d „  Z	 e e j
 d e ƒd „  ƒ Z e e j
 d e ƒd „  ƒ Z e e j
 d e ƒd „  ƒ Z d S(   iÿÿÿÿ(   t   settingsi   (   t   Tagst   Warningt   registers  You don't appear to be using Django's built-in cross-site request forgery protection via the middleware ('django.middleware.csrf.CsrfViewMiddleware' is not in your MIDDLEWARE_CLASSES). Enabling the middleware is the safest approach to ensure you don't leave any holes.t   ids   security.W003sï   You have 'django.middleware.csrf.CsrfViewMiddleware' in your MIDDLEWARE_CLASSES, but you have not set CSRF_COOKIE_SECURE to True. Using a secure-only CSRF cookie makes it more difficult for network traffic sniffers to steal the CSRF token.s   security.W016só   You have 'django.middleware.csrf.CsrfViewMiddleware' in your MIDDLEWARE_CLASSES, but you have not set CSRF_COOKIE_HTTPONLY to True. Using an HttpOnly CSRF cookie makes it more difficult for cross-site scripting attacks to steal the CSRF token.s   security.W017c           C   s   d t  j k S(   Ns)   django.middleware.csrf.CsrfViewMiddleware(   R    t   MIDDLEWARE_CLASSES(    (    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/checks/security/csrf.pyt   _csrf_middleware   s    t   deployc         K   s   t  ƒ  } | r g  St g S(   N(   R   t   W003(   t   app_configst   kwargst   passed_check(    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/checks/security/csrf.pyt   check_csrf_middleware#   s    	c         K   s$   t  ƒ  p t j } | r g  St g S(   N(   R   R    t   CSRF_COOKIE_SECUREt   W016(   R	   R
   R   (    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/checks/security/csrf.pyt   check_csrf_cookie_secure)   s    
	c         K   s$   t  ƒ  p t j } | r g  St g S(   N(   R   R    t   CSRF_COOKIE_HTTPONLYt   W017(   R	   R
   R   (    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/checks/security/csrf.pyt   check_csrf_cookie_httponly2   s    
	N(   t   django.confR    t    R   R   R   R   R   R   R   t   securityt   TrueR   R   R   (    (    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/checks/security/csrf.pyt   <module>   s   					