+
    NiA                         ^ RI HtHtHt ^ RIHtHtHtHt ]'       d   ^ RI	H
t
 ^ RIHt . RNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$Nt. R(Ot ! R% R&4      tR'# ))    )capture_internal_exceptionsAnnotatedValueiter_event_frames)TYPE_CHECKINGcastListDict)Event)Optionalpasswordpasswdsecretapi_keyapikeyauthcredentials	mysql_pwd
privatekeyprivate_keytokensession	csrftoken	sessionidx_csrftokenx_forwarded_for
set_cookiecookieauthorization	x_api_keyaiohttp_sessionzconnect.sid
csrf_tokencsrf_csrf_csrf_token	PHPSESSID_sessionsymfonyuser_session_xsrfz
XSRF-TOKENc                      a  ] tR t^=t o RV 3R lR lltV 3R lR ltV 3R lR ltV 3R lR	 ltV 3R
 lR ltV 3R lR lt	V 3R lR lt
V 3R lR ltV 3R lR ltV 3R lR ltRtV tR# )EventScrubberNc          
      2   < V ^8  d   QhRRRS[ RS[ RRRR/# )   denylistzOptional[List[str]]	recursivesend_default_piipii_denylistreturnN)bool)format__classdict__s   ":/tmp/pip-target-e6j6ikcs/lib/python/sentry_sdk/scrubber.py__annotate__EventScrubber.__annotate__>   s=     # #'# # 	#
 ,# 
#    c                ,   Vf   \         P                  4       MTV n        V'       g4   Vf   \        P                  4       MTpV ;P                  V,          un        V P                   Uu. uF  qUP	                  4       NK  	  upV n        W n        R# u upi )a  
A scrubber that goes through the event payload and removes sensitive data configured through denylists.

:param denylist: A security denylist that is always scrubbed, defaults to DEFAULT_DENYLIST.
:param recursive: Whether to scrub the event payload recursively, default False.
:param send_default_pii: Whether pii is sending is on, pii fields are not scrubbed.
:param pii_denylist: The denylist to use for scrubbing when pii is not sent, defaults to DEFAULT_PII_DENYLIST.
N)DEFAULT_DENYLISTcopyr.   DEFAULT_PII_DENYLISTlowerr/   )selfr.   r/   r0   r1   xs   &&&&& r6   __init__EventScrubber.__init__>   sp     4<3C(--//;/C$))+  MM\)M,0MM:MqM:" ;s   )Bc                $   < V ^8  d   QhRS[ RR/# )r-   lstr2   Nobject)r4   r5   s   "r6   r7   r8   X   s      f  r9   c                    \        V\        4      '       g   R# V F%  pV P                  V4       V P                  V4       K'  	  R# )a  
If a list is passed to this method, the method recursively searches the list and any
nested lists for any dictionaries. The method calls scrub_dict on all dictionaries
it finds.
If the parameter passed to this method is not a list, the method does nothing.
N)
isinstancelist
scrub_dict
scrub_list)r?   rD   vs   && r6   rK   EventScrubber.scrub_listX   s6     #t$$AOOAOOA r9   c                $   < V ^8  d   QhRS[ RR/# )r-   dr2   NrE   )r4   r5   s   "r6   r7   r8   f   s     # #F #t #r9   c                p   \        V\        4      '       g   R# VP                  4        F  w  r#\        V\        4      '       d9   VP	                  4       V P
                  9   d   \        P                  ! 4       W&   KS  V P                  '       g   Kg  V P                  V4       V P                  V4       K  	  R# )a3  
If a dictionary is passed to this method, the method scrubs the dictionary of any
sensitive data. The method calls itself recursively on any nested dictionaries (
including dictionaries nested in lists) if self.recursive is True.
This method does nothing if the parameter passed to it is not a dictionary.
N)rH   dictitemsstrr>   r.   r   +substituted_because_contains_sensitive_datar/   rJ   rK   )r?   rO   krL   s   &&  r6   rJ   EventScrubber.scrub_dictf   sw     !T""GGIDA !S!!aggi4==&@%QQS"" r9   c                "   < V ^8  d   QhRRRR/# r-   eventr
   r2   N )r4   r5   s   "r6   r7   r8   y   s     > >7 >t >r9   c                   \        4       ;_uu_ 4        R V9   d   RVR ,          9   d    V P                  VR ,          R,          4       RVR ,          9   d    V P                  VR ,          R,          4       RVR ,          9   d    V P                  VR ,          R,          4       RRR4       R#   + '       g   i     R# ; i)requestheaderscookiesdataNr   rJ   r?   rY   s   &&r6   scrub_requestEventScrubber.scrub_requesty   s    (**E!i 00OOE)$4Y$?@i 00OOE)$4Y$?@U9--OOE)$4V$<= +***s   BB,,B=	c                "   < V ^8  d   QhRRRR/# rX   rZ   )r4   r5   s   "r6   r7   r8      s     0 0 0T 0r9   c                    \        4       ;_uu_ 4        R V9   d   V P                  VR ,          4       RRR4       R#   + '       g   i     R# ; i)extraNr`   ra   s   &&r6   scrub_extraEventScrubber.scrub_extra   s2    (**%g/ +***	    =A	c                "   < V ^8  d   QhRRRR/# rX   rZ   )r4   r5   s   "r6   r7   r8      s     / / /D /r9   c                    \        4       ;_uu_ 4        R V9   d   V P                  VR ,          4       RRR4       R#   + '       g   i     R# ; i)userNr`   ra   s   &&r6   
scrub_userEventScrubber.scrub_user   s1    (**f. +***ri   c                "   < V ^8  d   QhRRRR/# rX   rZ   )r4   r5   s   "r6   r7   r8      s     	; 	;w 	;4 	;r9   c                8   \        4       ;_uu_ 4        R V9   dd   \        VR ,          \        4      '       gG   RVR ,          9   d9   VR ,          R,           F$  pRV9   g   K  V P                  VR,          4       K&  	  RRR4       R#   + '       g   i     R# ; i)breadcrumbsvaluesr_   N)r   rH   r   rJ   )r?   rY   values   && r6   scrub_breadcrumbsEventScrubber.scrub_breadcrumbs   sp    (**%"5#7HH E-$88!&}!5h!?!?!U? OOE&M: "@ +***s   A
B"BB	c                "   < V ^8  d   QhRRRR/# rX   rZ   )r4   r5   s   "r6   r7   r8      s     3 3' 3d 3r9   c                    \        4       ;_uu_ 4        \        V4       F$  pR V9   g   K  V P                  VR ,          4       K&  	  RRR4       R#   + '       g   i     R# ; i)varsN)r   r   rJ   )r?   rY   frames   && r6   scrub_framesEventScrubber.scrub_frames   s@    (***51U?OOE&M2 2 +***s   AAA"	c                "   < V ^8  d   QhRRRR/# rX   rZ   )r4   r5   s   "r6   r7   r8      s     6 6 6T 6r9   c                (   \        4       ;_uu_ 4        R V9   d\   \        \        \        \        \
        3,          ,          VR ,          4       F$  pRV9   g   K  V P                  VR,          4       K&  	  RRR4       R#   + '       g   i     R# ; i)spansr_   N)r   r   r   r	   rS   rF   rJ   )r?   rY   spans   && r6   scrub_spansEventScrubber.scrub_spans   s]    (**% d3;&7!8%.ID~V5 J +***s   AB B  B	c                "   < V ^8  d   QhRRRR/# rX   rZ   )r4   r5   s   "r6   r7   r8      s          T  r9   c                    V P                  V4       V P                  V4       V P                  V4       V P                  V4       V P	                  V4       V P                  V4       R # )N)rb   rg   rm   rt   rz   r   ra   s   &&r6   scrub_eventEventScrubber.scrub_event   sT    5!u%% r9   )r.   r/   )NFFN)__name__
__module____qualname____firstlineno__rA   rK   rJ   rb   rg   rm   rt   rz   r   r   __static_attributes____classdictcell__)r5   s   @r6   r+   r+   =   si     # #4 # #&> >0 0
/ /
	; 	;3 36 6   r9   r+   N)r   	x_real_ip
ip_addressremote_addr)sentry_sdk.utilsr   r   r   typingr   r   r   r	   sentry_sdk._typesr
   r   r;   r=   r+   rZ   r9   r6   <module>r      s    3 2'%% % 	%
 % % % % % % % % % %  !%$ %%& '%( )%* +%, -%. /%2 3%4 5%6 7%8 9%: ;%< =%> ?%@ A%B C%D E%F G%H I% N n  n r9   