
i4Vdc           @   s   d  d l  m Z d d l m Z m Z m Z d   Z e e d  d d Z e e d  d d	 Z e e d
  d d Z	 d   Z
 e e
 d  d d Z e e
 d  d d Z e e
 d  d d Z e e j d e d    Z e e j d e d    Z d   Z d   Z d S(   i(   t   settingsi   (   t   Tagst   Warningt   registerc         C   s   |  d S(   Nsq    Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.(    (   t   message(    (    sr   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/checks/security/sessions.pyt   add_session_cookie_message   s    sn   You have 'django.contrib.sessions' in your INSTALLED_APPS, but you have not set SESSION_COOKIE_SECURE to True.t   ids   security.W010s   You have 'django.contrib.sessions.middleware.SessionMiddleware' in your MIDDLEWARE_CLASSES, but you have not set SESSION_COOKIE_SECURE to True.s   security.W011s)   SESSION_COOKIE_SECURE is not set to True.s   security.W012c         C   s   |  d S(   Nss    Using an HttpOnly session cookie makes it more difficult for cross-site scripting attacks to hijack user sessions.(    (   R   (    (    sr   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/checks/security/sessions.pyt   add_httponly_message#   s    sp   You have 'django.contrib.sessions' in your INSTALLED_APPS, but you have not set SESSION_COOKIE_HTTPONLY to True.s   security.W013s   You have 'django.contrib.sessions.middleware.SessionMiddleware' in your MIDDLEWARE_CLASSES, but you have not set SESSION_COOKIE_HTTPONLY to True.s   security.W014s+   SESSION_COOKIE_HTTPONLY is not set to True.s   security.W015t   deployc         K   sf   g  } t  j sb t   r( | j t  n  t   rA | j t  n  t |  d k rb t g } qb n  | S(   Ni   (	   R    t   SESSION_COOKIE_SECUREt   _session_appt   appendt   W010t   _session_middlewaret   W011t   lent   W012(   t   app_configst   kwargst   errors(    (    sr   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/checks/security/sessions.pyt   check_session_cookie_secureA   s    			c         K   sf   g  } t  j sb t   r( | j t  n  t   rA | j t  n  t |  d k rb t g } qb n  | S(   Ni   (	   R    t   SESSION_COOKIE_HTTPONLYR
   R   t   W013R   t   W014R   t   W015(   R   R   R   (    (    sr   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/checks/security/sessions.pyt   check_session_cookie_httponlyN   s    			c           C   s   d t  j k S(   Ns4   django.contrib.sessions.middleware.SessionMiddleware(   R    t   MIDDLEWARE_CLASSES(    (    (    sr   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/checks/security/sessions.pyR   [   s    c           C   s   d t  j k S(   Ns   django.contrib.sessions(   R    t   INSTALLED_APPS(    (    (    sr   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/checks/security/sessions.pyR
   `   s    N(   t   django.confR    t    R   R   R   R   R   R   R   R   R   R   R   t   securityt   TrueR   R   R   R
   (    (    (    sr   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/checks/security/sessions.pyt   <module>   s:   													