/opt/alt/python37/lib/python3.7/site-packages/beaker
NameSizeModeActions
crypto/-0755rm
ext/-0755rm
__pycache__/-0755rm
cache.py219170644editdlrm
cache.pyc228710644editdlrm
cache.pyo228710644editdlrm
container.py240790644editdlrm
container.pyc299380644editdlrm
container.pyo299380644editdlrm
converters.py8980644editdlrm
converters.pyc11980644editdlrm
converters.pyo11980644editdlrm
cookie.py31890644editdlrm
cookie.pyc22850644editdlrm
cookie.pyo22850644editdlrm
exceptions.py4430644editdlrm
exceptions.pyc17600644editdlrm
exceptions.pyo17600644editdlrm
middleware.py64820644editdlrm
middleware.pyc68190644editdlrm
middleware.pyo68190644editdlrm
session.py328270644editdlrm
session.pyc333150644editdlrm
session.pyo332270644editdlrm
synchronization.py115250644editdlrm
synchronization.pyc139330644editdlrm
synchronization.pyo139330644editdlrm
util.py171180644editdlrm
util.pyc217010644editdlrm
util.pyo216250644editdlrm
_compat.py42560644editdlrm
_compat.pyc61010644editdlrm
_compat.pyo61010644editdlrm
__init__.py230644editdlrm
__init__.pyc1840644editdlrm
__init__.pyo1840644editdlrm
Edit: /opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyc (33315B)
Rd]c@s.ddklZlZlZlZlZlZlZddkZddk Z ddk l Z l Z ddk l ZlZlZlZlZlZddklZlZddklZddklZlZdd klZed d d d ddddddddf Z dddddddfZ!dddgZ"d e#fd!YZ$e$Z%yddk&Z&d"Z'WnNe(j oBddk)Z)e*ed#o ei+Z+n d$Z+d%Z'nXdefd&YZ,d'e-fd(YZ.de.fd)YZ/d*e/fd+YZ0d,e#fd-YZ1dS(.i(tPY2tpicklet http_cookiest unicode_textt b64encodet b64decodet string_typeiN(tdatetimet timedelta(thmact hmac_sha1tsha1tget_nonce_sizetDEFAULT_NONCE_BITStget_crypto_module(tcryptotutil(tclsmap(tBeakerExceptiontInvalidCryptoBackendError(t SimpleCookietJantFebtMartAprtMaytJuntJultAugtSeptOcttNovtDectMontTuetWedtThutFritSattSunt SignedCookietSessiontInvalidSignaturet_InvalidSignatureTypecBs eZdZdZdZRS(sBReturned from SignedCookie when the value's signature was invalid.cCstS(N(tFalse(tself((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyt __nonzero__scCstS(N(R,(R-((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyt__bool__s(t__name__t __module__t__doc__R.R/(((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyR+s cCs tiiS(N(tuuidtuuid4thex(((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyt _session_id$stgetpidcCsdS(Nt((((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyR7+scCsdtithtitf}tpMtt|idi}t |i ddi ddi dStt|i}|i ddi ddi dSdS(Ns%f%s%f%stasciit+t-t/t_t=( ttimetidtrandomR7RRR tencodetdigesttstrtreplacetrstrip(tid_strtraw_id((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyR6.s    !,cBs,eZdZddZdZdZRS(s7Extends python cookie to give digital signature supportcCs)|id|_tii||dS(NsUTF-8(RBtsecretRt BaseCookiet__init__(R-RItinput((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyRKAscCs|id}|p d|fSti|i|didti}d}|d }t|t|jo t |fSx-t ||D]\}}|||j7}qW|o t |fS|d|fSdS(Nt"i(sutf-8i( tstriptNonetHMACtnewRIRBtSHA1t hexdigesttlenR*tzip(R-tvaltsigt invalid_bitst input_sigtatb((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyt value_decodeEs +    cCsAti|i|idti}t|d||ffS(Nsutf-8s%s%s(RPRQRIRBRRRSRD(R-RVRW((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyt value_encodeZs'N(R0R1R2RORKR\R](((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyR(?s  t_ConfigurableSessioncBs&eZdZdddZdZRS(sProvides support for configurable Session objects. Provides a way to ensure some properties of sessions are always available with pre-configured values when they are not available in the session cookie itself. R<cCsh|d6|d6|_dS(Nt_domaint_path(t_config(R-t cookie_domaint cookie_path((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyRKgscCs'tt|i|i|idS(s5Clears Session data. Preserves session configuration.N(tsuperR^tcleartupdateRa(R-((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyRemsN(R0R1R2RORKRe(((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyR^_scBsgeZdZdeeddddeeddddededdedddZdZdZ dd Z e d Z d Z ed Zd ZedZedZdZdZeeeZdZdZeeeZddZdZdZdZdZdZedZdZ dZ!dZ"dZ#RS( sn Session object that uses container package for storage. :param invalidate_corrupt: How to handle corrupt data when loading. When set to True, then corrupt data will be silently invalidated and a new session created, otherwise invalid data will cause an exception. :type invalidate_corrupt: bool :param use_cookies: Whether or not cookies should be created. When set to False, it is assumed the user will handle storing the session on their own. :type use_cookies: bool :param type: What data backend type should be used to store the underlying session data :param key: The name the cookie should be set to. :param timeout: How long session data is considered valid. This is used regardless of the cookie being present or not to determine whether session data is still valid. Can be set to None to disable session time out. :type timeout: int or None :param save_accessed_time: Whether beaker should save the session's access time (True) or only modification time (False). Defaults to True. :param cookie_expires: Expiration date for cookie :param cookie_domain: Domain to use for the cookie. :param cookie_path: Path to use for the cookie. :param data_serializer: If ``"json"`` or ``"pickle"`` should be used to serialize data. Can also be an object with ``loads` and ``dumps`` methods. By default ``"pickle"`` is used. :param secure: Whether or not the cookie should only be sent over SSL. :param httponly: Whether or not the cookie should only be accessible by the browser not by JavaScript. :param encrypt_key: The key to use for the local session encryption, if not provided the session will not be encrypted. :param validate_key: The key used to sign the local encrypted session :param encrypt_nonce_bits: Number of bits used to generate nonce for encryption key salt. For security reason this is 128bits be default. If you want to keep backward compatibility with sessions generated before 1.8.0 set this to 48. :param crypto_type: encryption module to use :param samesite: SameSite value for the cookie -- should be either 'Lax', 'Strict', or None. sbeaker.session.idR<RtdefaulttLaxcKsti|d| d| |i|p!|o d|_qTd|_n ||_|p t|i|_||_||_||_||_ |o| ot dn||_ |i dj o|i d|id}|io(t-i.d|i|f|i/qnXdS(NRbRctfiletmemorys#timeout requires save_accessed_timei<ittimeouttcookieR8RLt_accessed_timet_creation_timesjInvalidating corrupt session %s; error was: %s. Set invalidate_corrupt=False to propagate this exception.ix(0R^RKRettypeRtnamespace_classtnamespace_argstrequesttdata_dirtkeyRRkROt save_atimet use_cookiestcookie_expirest_set_serializerR,twas_invalidatedRItsecurethttponlytsamesitet encrypt_keyt validate_keyR tencrypt_nonce_sizeRt crypto_moduleR@t accessed_dicttinvalidate_corrupttgetR(RlRt CookieErrorRtvalueR*tis_newt _create_idR?tloadt ExceptionRtwarnt invalidate(R-RrR@RRvRoRsRtRktsave_accessed_timeRwRbRctdata_serializerRIRzRpR{R}R~tencrypt_nonce_bitst crypto_typeR|Rqt cookieheadert cookie_datate((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyRKs                              cCs||_|idjoti|_nT|idjoti|_n1t|itotd|n ||_dS(NtjsonRs%Invalid value for data_serializer: %s(RRtJsonSerializert serializertPickleSerializert isinstanceRR(R-R((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyRxs cCs ||jS(N((R-tname((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pythas_keyscCs|i|i|i<|io|i|i|idt|id}|io(t%i&d |i'|f|i(qsnX|i dj oDt)i)}|i*d |}|||i jo|iqn|i+|_,|i-ndS(NRbRcsJNo AES library is installed, can't generate encrypted cookie-only Session.RRlR8s2No validate_key specified for Cookie only Session.s#timeout requires save_accessed_timeRLt_idsInvalid signaturesjInvalidating corrupt session %s; error was: %s. Set invalidate_corrupt=False to propagate this exception.Rm(.R^RKReRRthas_aesRRrRtRkRuRwR}R~R RR,RzR{R|RRxRRORR(RlRRR6RRRR*RfRRRRR@RR?RRRt_create_cookie(R-RrRtRkRRwRbRcR}R~RzR{RRRRR|tkwargsRRRRtlast_accessed_time((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyRK]sz                  -    cCs|dS(NRn((R-((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyRscCs|dS(NR((R-((s?/opt/alt/python37/lib/python3.7/site-packages/beaker/session.pyR@scCs||ds:4  .