https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib64/python2.7/site-packages/django/middleware/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/django/middleware/common.pyc
�
r�\c@s�ddlZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZejd	�Zd
efd��YZdefd
��YZdS(i����N(tsettings(t
mail_managers(turlresolvers(thttp(t
force_text(turlquote(tsixsdjango.requesttCommonMiddlewarecBs eZdZd�Zd�ZRS(sh
    "Common" middleware for taking care of some basic operations:

        - Forbids access to User-Agents in settings.DISALLOWED_USER_AGENTS

        - URL rewriting: Based on the APPEND_SLASH and PREPEND_WWW settings,
          this middleware appends missing slashes and/or prepends missing
          "www."s.

            - If APPEND_SLASH is set and the initial URL doesn't end with a
              slash, and it is not found in urlpatterns, a new URL is formed by
              appending a slash at the end. If this new URL is found in
              urlpatterns, then an HTTP-redirect is returned to this new URL;
              otherwise the initial URL is processed as usual.

        - ETags: If the USE_ETAGS setting is set, ETags will be calculated from
          the entire page content and Not Modified responses will be returned
          appropriately.
    cCsVd|jkrpx^tjD]P}|j|jd�rtjd|jdidd6|d6�tjd�SqWn|j	�}||jg}|}tj
r�|dr�|djd	�r�d	|d|d<ntjr}|d
j
d�r}t|dd�}tj|j|�r}tjd
|j|�r}|d
d|d
<tjrz|jdkrztd|d|d
f��qzq}n||kr�dS|dr�d|j�r�dnd|dt|d
�f}nt|d
�}|jjdd�rItjr|d|jd7}qIy|d|jdj�7}WqItk
rEqIXntj|�S(s�
        Check for denied User-Agents and rewrite the URL based on
        settings.APPEND_SLASH and settings.PREPEND_WWW
        tHTTP_USER_AGENTsForbidden (User agent): %stextrai�tstatus_codetrequests<h1>Forbidden</h1>iswww.it/turlconfs%s/tPOSTsYou called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to %s%s (note the trailing slash), or set APPEND_SLASH=False in your Django settings.Ns	%s://%s%sthttpsRtQUERY_STRINGtt?(tMETARtDISALLOWED_USER_AGENTStsearchtloggertwarningtpathRtHttpResponseForbiddentget_hosttPREPEND_WWWt
startswithtAPPEND_SLASHtendswithtgetattrtNoneRt
is_valid_patht	path_infotDEBUGtmethodtRuntimeErrort	is_secureRtgetRtPY3tdecodetUnicodeDecodeErrortHttpResponsePermanentRedirect(tselfRtuser_agent_regexthosttold_urltnew_urlR
tnewurl((s:/tmp/pip-install-XxeQeY/django/django/middleware/common.pytprocess_request'sJ!
	
cCstjr5tjdtdd�t�j||�ntjr�|jd�rZ|d}n.|j	rld	}ndtj|j
�j�}|d	k	r�d|jko�dknr�|jjd�|kr�|j}tj�}||_q�||d<q�n|S(
s0
        Calculate the ETag, if needed.
        sNSEND_BROKEN_LINK_EMAILS is deprecated. Use BrokenLinkEmailsMiddleware instead.t
stacklevelitETags"%s"i�i,tHTTP_IF_NONE_MATCHN(RtSEND_BROKEN_LINK_EMAILStwarningstwarntPendingDeprecationWarningtBrokenLinkEmailsMiddlewaretprocess_responset	USE_ETAGSt
has_headert	streamingR thashlibtmd5tcontentt	hexdigestR
RR'tcookiesRtHttpResponseNotModified(R,RtresponsetetagRC((s:/tmp/pip-install-XxeQeY/django/django/middleware/common.pyR;js$		
	
			(t__name__t
__module__t__doc__R2R;(((s:/tmp/pip-install-XxeQeY/django/django/middleware/common.pyRs	CR:cBs#eZd�Zd�Zd�ZRS(cCs�|jdkr�tjr�|j�}|j�}t|jjdd�dd�}|j||||�s�|jjdd�}|jjdd�}t	d	|j
||�r�d
nd|fd||||fdt�q�n|S(
sO
        Send broken link emails for relevant 404 NOT FOUND responses.
        i�tHTTP_REFERERRterrorstreplaceRs<none>tREMOTE_ADDRsBroken %slink on %ss	INTERNAL s=Referrer: %s
Requested URL: %s
User agent: %s
IP address: %s
t
fail_silently(R
RR#Rt
get_full_pathRRR'tis_ignorable_requestRtis_internal_requesttTrue(R,RREtdomainRtreferertuatip((s:/tmp/pip-install-XxeQeY/django/django/middleware/common.pyR;�s!
cCs#ttjdtj|�|��S(s^
        Returns True if the referring URL is the same domain as the current request.
        s
^https?://%s/(tbooltretmatchtescape(R,RSRT((s:/tmp/pip-install-XxeQeY/django/django/middleware/common.pyRQ�scsG|s&|j||�r*d|kr*tSt�fd�tjD��S(sY
        Returns True if the given request *shouldn't* notify the site managers.
        Rc3s|]}|j��VqdS(N(R(t.0tpattern(turi(s:/tmp/pip-install-XxeQeY/django/django/middleware/common.pys	<genexpr>�s(RQRRtanyRtIGNORABLE_404_URLS(R,RR]RSRT((R]s:/tmp/pip-install-XxeQeY/django/django/middleware/common.pyRP�s(RGRHR;RQRP(((s:/tmp/pip-install-XxeQeY/django/django/middleware/common.pyR:�s		(R?tloggingRXR7tdjango.confRtdjango.core.mailRtdjango.coreRtdjangoRtdjango.utils.encodingRtdjango.utils.httpRtdjango.utilsRt	getLoggerRtobjectRR:(((s:/tmp/pip-install-XxeQeY/django/django/middleware/common.pyt<module>su

https://t.me/AnonymousX5 - 2025