ó
ù2¢\c           @   s_   d  Z  d d l m Z d d l m Z d d l m Z d e f d „  ƒ  YZ e e f g Z d	 S(
   s&   Tornado handlers for security logging.iÿÿÿÿ(   t   webi   (   t
   APIHandleri   (   t   csp_report_urit   CSPReportHandlerc           B   s8   e  Z d  Z e Z d „  Z d „  Z e j d „  ƒ Z	 RS(   s2   Accepts a content security policy violation reportc         C   s   t  S(   s:   Don't check origin when reporting origin-check violations!(   t   True(   t   self(    (    sB   lib/python2.7/site-packages/notebook/services/security/handlers.pyt   skip_check_origin   s    c         C   s   d  S(   N(    (   R   (    (    sB   lib/python2.7/site-packages/notebook/services/security/handlers.pyt   check_xsrf_cookie   s    c         C   s)   |  j  j d |  j j j d d ƒ ƒ d S(   s.   Log a content security policy violation reports   Content security violation: %st   utf8t   replaceN(   t   logt   warningt   requestt   bodyt   decode(   R   (    (    sB   lib/python2.7/site-packages/notebook/services/security/handlers.pyt   post   s    (
   t   __name__t
   __module__t   __doc__t   Falset   _track_activityR   R   R    t   authenticatedR   (    (    (    sB   lib/python2.7/site-packages/notebook/services/security/handlers.pyR      s
   		N(	   R   t   tornadoR    t   base.handlersR   t    R   R   t   default_handlers(    (    (    sB   lib/python2.7/site-packages/notebook/services/security/handlers.pyt   <module>   s
   