+
    Tj                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHtH	t	H
t
Ht ^ RIHt ^ RIHtHt  ! R R]
4      tR# )    N)settings)VALID_KEY_CHARSCreateErrorSessionBaseUpdateError)InvalidSessionKey)ImproperlyConfiguredSuspiciousOperationc                      a a ] tR t^t oRtRV 3R llt]R 4       tRR ltR t	R t
R tR tR	 tR
 tRR ltRR ltR tR tRR ltRR lt]R 4       t]R 4       tRtVtV ;t# )SessionStorez'
Implement a file based session store.
c                z   < V P                  4       V n        \        P                  V n        \
        SV `  V4       R # N)_get_storage_pathstorage_pathr   SESSION_COOKIE_NAMEfile_prefixsuper__init__)selfsession_key	__class__s   &&Z/var/www/idalgo/venv/lib/python3.14/site-packages/django/contrib/sessions/backends/file.pyr   SessionStore.__init__   s/     224#77%    c                    V P                   #   \         dq    \        \        R R4      ;'       g    \        P
                  ! 4       p\        P                  P                  T4      '       g   \        RT,          4      hYn         Tu # i ; i)SESSION_FILE_PATHNzThe session storage path %r doesn't exist. Please set your SESSION_FILE_PATH setting to an existing directory in which Django can store session data.)
_storage_pathAttributeErrorgetattrr   tempfile
gettempdirospathisdirr	   )clsr   s   & r   r   SessionStore._get_storage_path   s    	 $$$ 	 "5t<UU@S@S@U  77==..*68DE  !-	 s    "B	:B	,B	B	c                    Vf   V P                  4       p\        V4      P                  \        4      '       g   \	        R4      h\
        P                  P                  V P                  V P                  V,           4      # )z0
Get the file associated with this session key.
z!Invalid characters in session key)
_get_or_create_session_keysetissubsetr   r   r"   r#   joinr   r   r   r   s   &&r   _key_to_fileSessionStore._key_to_file/   sb     99;K
 ;((99#$GHHww||D--t/?/?+/MNNr   c                    \         P                  ! V P                  4       4      P                  p\        P
                  '       d   \        P                  MRp\        P                  P                  WR7      # )zI
Return the modification time of the file storing the session's content.
N)tz)	r"   statr-   st_mtimer   USE_TZdatetimeUTCfromtimestamp)r   modificationr0   s   &  r   _last_modificationSessionStore._last_modification>   sN     wwt0023<<%___X\\$  ..|.CCr   c                    VP                  R4      ;'       g;    V P                  4       \        P                  ! V P	                  4       R7      ,           # )zC
Return the expiry time of the file storing the session's content.
_session_expiry)seconds)getr8   r4   	timedeltaget_session_cookie_age)r   session_datas   &&r   _expiry_dateSessionStore._expiry_dateF   sK      12 
 
##%  )D)D)FGH	
r   c                   / p \        V P                  4       R R7      ;_uu_ 4       pVP                  4       pRRR4       X'       d]    V P                  V4      pV P                  V P                  V4      R7      pV^ 8:  d#   / pV P!                  4        V P                  4        V#   + '       g   i     Lv; i  \        \
        3 d|   p\        T\
        4      '       dL   \        P                  ! RTP                  P                  ,          4      pTP                  \        T4      4       T P                  4         Rp?LRp?ii ; i  \"        \
        3 d    RT n         T# i ; i)ascii)encodingNzdjango.security.%s)expiry)openr-   readdecodeEOFErrorr
   
isinstancelogging	getLoggerr   __name__warningstrcreateget_expiry_agerA   deleteOSError_session_key)r   r@   session_file	file_dataelogger
expiry_ages   &      r   loadSessionStore.loadO   s&   	%d'')G<<(--/	 = "#';;y#9L "008I8I,8W0X
?#%LKKMKKM / =< !"56 "!!%899!(!2!201;;3G3GG" s1v.KKMM" ,- 	% $D	%sS   #E B&E 	B9 A
E &B6	1E 9E
A1E ;E  EE E$#E$c                *   "   V P                  4       # 5ir   )r[   r   s   &r   aloadSessionStore.aloadk   s     yy{   c                     V P                  4       V n         V P                  R R7       R T n        R#   \         d     K@  i ; i)Tmust_createN)_get_new_session_keyrU   saver   modifiedr^   s   &r   rQ   SessionStore.createn   sI     $ 9 9 ;D		d	+ !DM  s   3 AAc                *   "   V P                  4       # 5ir   )rQ   r^   s   &r   acreateSessionStore.acreatex   s     {{}ra   c                B   V P                   f   V P                  4       # V P                  VR7      pV P                  4       p \        P
                  \        \        R^ 4      ,          pV'       d-   V\        P                  \        P                  ,          ,          p\        P                  ! W44      p\        P                  ! V4       \        P                  P!                  V4      w  rg \"        P$                  ! WgR,           R7      w  rRp
  \        P&                  ! WP)                  V4      P)                  4       4       \        P                  ! V4       \*        P,                  ! W4       Rp
V
'       g   \        P.                  ! V	4       R # R #   \         d    T'       g   \        h L\         d    T'       d   \        h Li ; i  \        P                  ! T4       i ; i  T
'       g   \        P.                  ! T	4       i i ; i  \0        \2        3 d     R # i ; i)N)no_loadO_BINARY_out_)dirprefixFT)r   rQ   _get_sessionr-   r"   O_WRONLYr   O_EXCLO_CREATrG   closeFileNotFoundErrorr   FileExistsErrorr   r#   splitr    mkstempwriteencodeshutilmoveunlinkrJ   rT   )r   rd   r@   session_file_nameflagsfdrp   rq   output_file_fdoutput_file_namerenameds   &&         r   rf   SessionStore.save{   s   #;;=  (((= --/	" KK'"j!"<<ERZZ//*2BHHRL. ggmm$56	/7/?/? 00,N G0-HH^[[-F-M-M-OPHH^,
 ,@II./ S ! 	"!!  	"!! 	"< HH^, II./ '" 		sg   BF *"H	 3G
 .G% /H	 G$G,G5G>GG
G""G% %!HH	 	HHc                .   "   V P                  VR 7      # 5i)rc   )rf   )r   rd   s   &&r   asaveSessionStore.asave   s     yy[y11   c                ^    \         P                  P                  V P                  V4      4      # r   )r"   r#   existsr-   r,   s   &&r   r   SessionStore.exists   s     ww~~d//<==r   c                ,   "   V P                  V4      # 5ir   )r   r,   s   &&r   aexistsSessionStore.aexists   s     {{;''s   c                    Vf   V P                   f   R # V P                   p \        P                  ! V P                  V4      4       R #   \         d     R # i ; ir   )r   r"   r   r-   rT   r,   s   &&r   rS   SessionStore.delete   sP    '**K	IId''45 		s   %A	 	AAc                .   "   V P                  VR 7      # 5i))r   )rS   r,   s   &&r   adeleteSessionStore.adelete   s     {{{{33r   c                   V P                  4       p\        P                  p\        P                  ! V4       FM  pVP                  V4      '       g   K  VP                  V4      pV ! V4      pR  Vn        VP                  4        KO  	  R# )c                      R # r    r   r   r   <lambda>,SessionStore.clear_expired.<locals>.<lambda>   s    Tr   N)	r   r   r   r"   listdir
startswithremoveprefixrQ   r[   )r%   r   r   rV   r   sessions   &     r   clear_expiredSessionStore.clear_expired   sn    ,,.22JJ|4L**;77&33K@K+&G *GNLLN 5r   c                .   "   V P                  4        R # 5ir   )r   )r%   s   &r   aclear_expiredSessionStore.aclear_expired   s     r   )rU   r   rg   r   r   )F)rN   
__module____qualname____firstlineno____doc__r   classmethodr   r-   r8   rA   r[   r_   rQ   rj   rf   r   r   r   rS   r   r   r   __static_attributes____classdictcell____classcell__)r   __classdict__s   @@r   r   r      s     &
    $OD
8=~2>(4     r   r   )r4   rL   r"   r}   r    django.confr   %django.contrib.sessions.backends.baser   r   r   r   "django.contrib.sessions.exceptionsr   django.core.exceptionsr	   r
   r   r   r   r   <module>r      s8      	      A LP; Pr   