��
��Pc�@s�dZddklZddkZddkZddkZddkZddkZddkZddk Z ddk
Z
ddkZddkZddk
ZddkZddklZddklZddklZlZyddklZWn)ej
odZeei�ZnXdd klZdd
klZddklZddkl Z dd
k!l"Z"y"ddk#Z#e#i$Z%e#i&Z'Wn=ej
o1ddk$Z$ddk(Z(e$i)Z%e(i)Z'nXye*e+fWne,j
odZ*dZ+nXdZ-dZ.dZ/dZ0eedZ1ei2dei3�Z4ei2dei3�Z5d�Z6d�Z7de*d�Z8d�Z9d�Z:d�Z;ei2d�Z<ei2d�Z=d �Z>ei2d!�Z?d"d#�Z@de+d$�ZBd%�ZCe+d&�ZDd�ZEd�ZFgZGxAeED]9ZHx0eFD](ZIeGiJeIeH�eGiJeHeI�qWq W[I[Hd=�ZKd>�ZLeiMd?�ZNd@�ZOe*dA�ZPe*dB�ZQe*dC�ZRdD�ZSdE�ZTe+dF�ZUdG�ZVdHeWfdI��YZXde+dddJ�ZYde+dddK�ZZhd�dL6d�dM6d�dN6d�dO6d�dP6d�dR6d�dS6d�dU6d�dV6d�dW6d�dX6Z[dY�Z\de*dZ�Z]de+d[�Z^d\�Z_d]�Z`d^�Zad_�Zbd`�Zcddda�Zddaedb�Zfddc�Zgdd�Zhde�Zidf�Zjdg�Zkddh�Zlddi�Zmdj�Zndk�Zodldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gaZpei2d�iqep�ei3�Zrei2d��Zsei2d�ei3�Ztd��Zud��ZvdS(�s�Miscellaneous essential routines.
This includes actual message transmission routines, address checking and
message and address munging, a handy-dandy routine to map a function on all
the mailing lists, and whatever else doesn't belong elsewhere.
i����(t
nested_scopesN(tHeaderParseError(tUnicodeType(t
whitespacetdigits(t
ascii_letterstabcdefghijklmnopqrstuvwxyz(tmm_cfg(tErrors(tSite(tSafeDict(tsyslogiitus
t.t_s%\(([_a-z]\w*?)\)s?s%(\${2})|\$([_a-z]\w*)|\${([_a-z]\w*)}cCsUti|�}x?dD]7}tii|d|�}tii|�otSqWtS(s'Return true iff list `listname' exists.s.pcks .pck.lasts.dbs.db.lasttconfig(s.pcks .pck.lasts.dbs.db.last(R tget_listpathtostpathtjointexiststTruetFalse(tlistnametbasepathtexttdbfile((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytlist_existsXs cCs
ti�S(s8Return the names of all lists in default list directory.(R t
get_listnames(((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt
list_namesgsiFcCs�d}tid|�}xt|D]l}g}t}x�|it�D]�}|p|i|�qAn|o|dtjo
t} nt} |o'| o |di�d||d<n|i|�| }qAWx�|D]�}x�|o�t|�|jo|}d}n\|}
x-|
djo||
tjo|
d8}
qW|
}x-|djo||tjo|d8}qHW|djo�|}x3|t|�jo||tjo|d7}q�W|}
x3|
t|�jo||
tjo|
d7}
q�W|
d8}
n||d d}|
d7}
x3|
t|�jo||
tjo|
d7}
q'W||
}||7}q�W|d7}q�W|d7}qW|d S( s�Wrap and fill the text to the specified column.
Wrapping is always in effect, although if it is not possible to wrap a
line (because some word is longer than `column' characters) the line is
broken at the next available whitespace boundary. Paragraphs are also
always filled, unless honor_leading_ws is true and the line begins with
whitespace. This is the algorithm that the Python FAQ wizard uses, and
seems like a good compromise.
Rs
ii����t is
i����( tretsplitRtNLtappendRRtrstriptlen(ttexttcolumnthonor_leading_wstwrappedtparastparatlinestfillprevtlinetfillthistbolteol((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytwraposj
$$
$
cCs"d}d}|i|i|��S(Ns
.
s
.
(RR (R%tJOINERtSEP((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytQuotePeriods�scCspd}d}|i�}|id�}|djo|dfS|| }||d}|id�}||fS(Nt@iR
(tNonetlowertfindR (temailtusertdomaintat_signtrest((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt
ParseEmail�s
cCs?|id�}|djo|S|| d||di�S(s3returns the address with the domain part lowercasedR5i����i(R8R7(taddrtatind((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytLCDomain�s
s[][()<>|;^,\000-\037\177-\377]s[:\\"]cCs�|p|id�djo
ti�nti|�p|ddjoti|�nt|�\}}|pti|�nt|�djoti|�n|id�o
|i d�p$t
i|�oti|�q�ndS(s0Verify that an email address isn't grossly evil.Rit-it"N(tcountRtMMBadEmailErrort _badcharstsearchtMMHostileAddressR>R$t
startswithtendswitht _specials(tsR:tdomain_parts((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt
ValidateEmail�s
! s[^\x21-\x7e]t PATH_INFOcCs�tii|�}|ohti|�o$ti|�d}tdd�ng}|id�D]}|o||qaqa~SdS(Niterrors(Warning: Possible malformed path attack.t/(RtenvirontgettCRNLpatRGR RR6(tenvarRt_[1]tp((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt
GetPathPieces�s4cCs1|djo3tit�}|ddjo|d}q@ntiid�}|djo,tiidd�tiidd�}nti|�d}|ov|i|�of|t |�}|i
d�}|d jo|idd |�}n|id�}d
||}n||}|tiS(s�target - scriptname only, nothing extra
web_page_url - the list's configvar of the same name
absolute - a flag which if set, generates an absolute url
i����RQtREQUEST_URItSCRIPT_NAMERROit?is../N(
R6RtDEFAULT_URL_PATTERNt
get_domainRRRRSturlparseRIR$R8RDtCGIEXT(ttargettweb_page_urltabsolutetfullpathtbaseurltiRDR((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt ScriptURL�s$
cCs�|i�}t|�\}}|g}|oS|d}xFt|�djo.|id|ti|�f�|d}q;Wn|S(sreturns a sorted list of addresses that could possibly match
a given name.
For Example, given scott@pobox.com, return ['scott@pobox.com'],
given scott@blackbox.pobox.com return ['scott@blackbox.pobox.com',
'scott@pobox.com']iis%s@%s(R7R>R$R"tDOTR(tnameR:R;tres((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytGetPossibleMatchingAddrss
cCsQh}|o%x=|D]}t||i�<qWnx|D]}t||<q9W|S(s<Return a dict keyed by the entries in the list passed to it.(RR7(tLtfoldcasetdRe((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt List2Dict0stateRetotutbtcRmtftgthtktmtnRWtrRLtttvtwtxtzcCsLg}x2t|�d|jo|itit��q Wti|�| S(Ni(R$R"trandomtchoicet
_syllablestEMPTYSTRINGR(tlengthtsyls((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytUserFriendly_MakeRandomPasswordHs
c
CsSd}g}d}zx�||jo�yti||�}Wn�ttfj
o�|djocytidti�}Wq�tj
o7}|iti jo�nt
dd�t|�SXnti|||�}nX|i
|�|t|�7}qWtiti|��}|idd�| SWd|dj oti|�nXdS(Nis/dev/urandomRPs+urandom not available, passwords not secures
R(R6RturandomtAttributeErrortNotImplementedErrortopentO_RDONLYtOSErrorterrnotENOENTRR�treadR"R$tbase64tencodestringR�Rtreplacetclose(R�t bytesreadtbytestfdtnewbytesRpRL((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytSecure_MakeRandomPasswordOs2
cCstiot|�St|�S(N(RtUSER_FRIENDLY_PASSWORDSR�R�(R�((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytMakeRandomPasswordps
cCsRtti�d�}tti�d�}d�}dtt|||f��S(Ni4cSs\d|jo
djno|d7}nd|jo
djno|d7}n|S(NiiiAi4iG((Rt((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytmkletterys
s%c%c(tintR�ttupletmap(tchr1tchr2R�((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt
GetRandomSeedvs cCs{|o
ti}n
ti}tid�}z:t|d�}|it|�i�d�|i �Wdti|�XdS(NiR~s
(
RtSITE_PW_FILEtLISTCREATOR_PW_FILERtumaskR�twritetsha_newt hexdigestR�(tpwt siteadmintfilenametomasktfp((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytset_global_password�s
cCs~|o
ti}n
ti}y*t|�}|i�d }|i�Wn0tj
o$}|itijo�ndSX|S(Ni����(
RR�R�R�R�R�tIOErrorR�R�R6(R�R�R�t challengeRp((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytget_global_password�s
cCs4t|�}|djodS|t|�i�jS(N(R�R6R�R�(tresponseR�R�((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytcheck_global_password�s
cCsti|dt�S(Ntquote(tcgitescapeR(RL((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytwebsafe�scCse|idd�}t|�djo6y|dt|d�fSWq[tj
oq[Xn|dfS(Nt:iiiiw(R R$R�t
ValueError(RLtparts((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt nntpsplit�s cCs,|o|idd�S|idd�SdS(s�Make email address unrecognizable to web spiders, but invertable.
When for_text option is set (not default), make a sentence fragment
instead of a token.R5s at s--at--N(R�(R?tfor_text((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytObscureEmail�scCs|idd�S(s!Invert ObscureEmail() conversion.s--at--R5(R�(R?((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytUnobscureEmail�st OuterExitcBseZRS((t__name__t
__module__(((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyR��scCs�g}|dj o|i|�n|dj o|i|i�n|iti�g}|dj o9|i|i��|itiiti |i
��n|itiiti d��|iti �d}y�x�|D]}}xt|D]l}tii|||�} yt| �}t�Wq�t
j
o)}
|
itijo�nd}q�Xq�Wq�WWntj
onX|djovy+tiiti d|�} t| �}Wq�t
j
o8}
|
itijo�nt
tid|��q�Xn|i�}|i�|}|dj o�y`t|�}
y|
i|�}Wn:tj
o.t|t|�d�}|
i|�}nXWq�ttfj
o}
tdd| |
�q�Xn|o|| fSt|�| fS(NtsitetensNo template file foundR�RPsbroken template: %s
%s(R6R"tpreferred_languageRtDEFAULT_SERVER_LANGUAGERcRRRtTEMPLATE_DIRt host_nameR�R�R�R�R�R�R�R
tinterpolatetUnicodeErrortunicodet
GetCharSett TypeErrorR�RR1(ttemplatefiletdicttrawtlangtmlistt languagest
searchdirsR�tdirR�RpttemplateR%tsdictt utemplate((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytfindtext�sj4
&
cCst|||||�dS(Ni(R�(R�R�R�R�R�((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytmaketextAstconfirmthelptinfotliststoptionsitpasswordtremoveitsett subscribetunsubscribetwhoc
Cs�d}g}xitii|�D]U}|djoPn|i�o|d7}n|tijotS|i|�qWti |�}t
i|i�i��ot
S|d }t|idd��}|i|�x�|D]�}|i�pq�ng}|i�D]}||i�q ~} t
i| dd�\}
}|
djo|djoq�n|
t| d�jo
|jno.| ddjo| ddjoq�nt
Sq�WtS(
Nis-- iitsubjectRR�itontoff(NN(R�R�(R9t Iteratorstbody_line_iteratortstripRtDEFAULT_MAIL_COMMANDS_MAX_LINESRR"R!Rt ADMINDATAthas_keyR7RtstrRSR R6R$(tmsgtlinecntR+R-tbodytextt bodylinesR�RVtwordtwordstminargstmaxargs((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytis_administriviaXs<
-(" cCs�|}tiid�otid}nCtiid�o/tiid�otidtid}n|ot|�S|S(sReturn the full virtual path this CGI script was invoked with.
Newer web servers seems to supply this info in the REQUEST_URI
environment variable -- which isn't part of the CGI/1.1 spec.
Thus, if REQUEST_URI isn't available, we concatenate SCRIPT_NAME
and PATH_INFO, both of which are part of CGI/1.1.
Optional argument `fallback' (default `None') is returned if both of
the above methods fail.
The url will be cgi escaped to prevent cross-site scripting attacks,
unless `escape' is set to 0.
RYRZRO(RRRR�R�(tfallbackR�turl((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt
GetRequestURIs&cCs�x�|o�|o|�nytidti�\}}Wn:tj
o.}|itijo�n|i�PnX|djo%y||=Wq�tj
oq�Xn|oPqqWdS(Ni����i(RtwaitpidtWNOHANGR�R�tECHILDtcleartKeyError(tkidstfunctoncetpidtstatusRp((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytreap�s$
cCsti|dS(Ni(RtLC_DESCRIPTIONS(R�((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytGetLanguageDescr�scCsti|dS(Ni(RR(R�((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyR��scCsti|dS(Ni(RR(R�((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytGetDirection�scCstii|�S(N(RRR�(R�((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt
IsLanguage�scCs�tiidtiid��}tiid�}|o-|id|�o|t|�d }ntio|o|i�Stiot i ti�dpti
}|i�SdS(Nt HTTP_HOSTtSERVER_NAMEtSERVER_PORTR�i(RRRRSRJR$RtVIRTUAL_HOST_OVERVIEWR7tDEFAULT_URLR^tDEFAULT_URL_HOST(thosttportthostname((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyR]�s!
cCs_|djotiit�t��}n|djodti|fSdti||fS(Ns%s@%ss%s-%s@%s(R6Rt
VIRTUAL_HOSTSRSR]tMAILMAN_SITE_LIST(Rtextra((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytget_site_email�s
cCs<dtti�ti�|i�|if}td7a|S(Ns<mailman.%d.%d.%d.%s@%s>i(t_serialttimeRtgetpidt
internal_nameR�(R�tmsgid((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytunique_message_id�s
cCs6|djoti�d }nti|dd�S(Niiii����(i(iiiii(i����(R6Rt localtimetmktime(tdate((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytmidnight�s
cCs�|idd�idd�}ti|�}xttdt|�d�D]Z}||do3||ddtjod||d ||<qFd||||<qFWti|�S(
s$Convert from %-strings to $-strings.t$s$$s%%t%iiis${t}(R�tcreR trangeR$t
IDENTCHARSR�R(RLR�Re((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt to_dollar�s(cCs�|idd�idd�}ti|�}x�tdt|�d�D]z}||d
j od||<qF||dd
j o"d||dd||d<qFd||d d||d <qFWtitd
|��S(s$Convert from $-strings to %-strings.R"s%%s$$R!iis%(s)siN( R�tdreR R%R$R6R�Rtfilter(RLR�Re((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt
to_percents""cCsih}x\tdg}ti|�D]$\}}}||p|pdq#~�D]}t||<qQW|S(s?Return the set (dictionary) of identifiers found in a $-string.N(R)R6R(tfindallR(RLRmRVRoRsRtRh((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytdollar_identifierss
KcCs.h}x!ti|�D]}t||<qW|S(s?Return the set (dictionary) of identifiers found in a %-string.(R$R+R(RLRmRh((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytpercent_identifierss
cs�g�tid|�}�fd�}x�to��i|id��|pPn|id�}|id�oGy|t|d��Wqtj
o�id|d�qXq*ti i
|d�}|id�o+|id�o|t|dd !��q*�i|�q*Wti
��}t|t�o|S|djo
d
}n$t|�}|djo
d
}nt||d�S(
Ns&(?P<ref>[^;]+);cs;|djo�it|��n�it|��dS(Ni(R"tchrtunichr(Re(tnewparts(sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytappchr*s
it#it&t;R[i����s
iso-8859-1sus-asciiR�(RR RR"tpopRIR�R�thtmlentitydefst
entitydefsRSRJR�Rt
isinstanceRR6R�R�(RLR�R�R1trefRttnewstrtcharset((R0sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytcanonstr's6
cCs�|djo
d}n|djo
d}n
t|�}y5t|t�o|i|�St||�}|SWntj
ot|�SXdS(Nusus-ascii(R6R�R8RtencodeR�R�tuquote(RLR�R;Rr((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt
uncanonstrUs
cCseg}xI|D]A}t|�}|djo|id|�q
|i|�q
Wtti|��S(Nis&#%3d;(tordR"R�R�R(RLRoRtRq((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyR>js
cCs�yStiitii|��}|i�}ti|i��}|i|d�SWn/t t
ttfj
ot
i|i��SXdS(NR�(R9tHeadertmake_headert
decode_headert__unicode__tUEMPTYSTRINGRt
splitlinesR=tLookupErrorR�R�RR�(RLtcsetRwtustrR-((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytonelinevss<i?frames2<link(?! rel="SHORTCUT ICON" href="<mm-favicon>">)s<metas<objects<scripts(?:^|\W)j(?:ava)?script(?:\W|$)s(?:^|\W)vbs(?:cript)?(?:\W|$)s(?:^|\W)domactivate(?:\W|$)s(?:^|\W)domattrmodified(?:\W|$)s((?:^|\W)domcharacterdatamodified(?:\W|$)s"(?:^|\W)domfocus(?:in|out)(?:\W|$)s((?:^|\W)dommenuitem(?:in)?active(?:\W|$)s(?:^|\W)dommousescroll(?:\W|$)s0(?:^|\W)domnodeinserted(?:intodocument)?(?:\W|$)s/(?:^|\W)domnoderemoved(?:fromdocument)?(?:\W|$)s"(?:^|\W)domsubtreemodified(?:\W|$)s(?:^|\W)fscommand(?:\W|$)s(?:^|\W)onabort(?:\W|$)s!(?:^|\W)on(?:de)?activate(?:\W|$)s'(?:^|\W)on(?:after|before)print(?:\W|$)s((?:^|\W)on(?:after|before)update(?:\W|$)sD(?:^|\W)onbefore(?:(?:de)?activate|copy|cut|editfocus|paste)(?:\W|$)s(?:^|\W)onbeforeunload(?:\W|$)s(?:^|\W)onbegin(?:\W|$)s(?:^|\W)onblur(?:\W|$)s(?:^|\W)onbounce(?:\W|$)s(?:^|\W)onbroadcast(?:\W|$)s!(?:^|\W)on(?:cell)?change(?:\W|$)s%(?:^|\W)oncheckboxstatechange(?:\W|$)s(?:^|\W)on(?:dbl)?click(?:\W|$)s(?:^|\W)onclose(?:\W|$)s$(?:^|\W)oncommand(?:update)?(?:\W|$)s*(?:^|\W)oncomposition(?:end|start)(?:\W|$)s(?:^|\W)oncontextmenu(?:\W|$)s(?:^|\W)oncontrolselect(?:\W|$)s(?:^|\W)oncopy(?:\W|$)s(?:^|\W)oncut(?:\W|$)s(?:^|\W)ondataavailable(?:\W|$)s-(?:^|\W)ondataset(?:changed|complete)(?:\W|$)sA(?:^|\W)ondrag(?:drop|end|enter|exit|gesture|leave|over)?(?:\W|$)s(?:^|\W)ondragstart(?:\W|$)s(?:^|\W)ondrop(?:\W|$)s(?:^|\W)onend(?:\W|$)s"(?:^|\W)onerror(?:update)?(?:\W|$)s(?:^|\W)onfilterchange(?:\W|$)s(?:^|\W)onfinish(?:\W|$)s"(?:^|\W)onfocus(?:in|out)?(?:\W|$)s(?:^|\W)onhelp(?:\W|$)s(?:^|\W)oninput(?:\W|$)s&(?:^|\W)onkey(?:up|down|press)(?:\W|$)s (?:^|\W)onlayoutcomplete(?:\W|$)s(?:^|\W)on(?:un)?load(?:\W|$)s(?:^|\W)onlosecapture(?:\W|$)s)(?:^|\W)onmedia(?:complete|error)(?:\W|$)sB(?:^|\W)onmouse(?:down|enter|leave|move|out|over|up|wheel)(?:\W|$)s$(?:^|\W)onmove(?:end|start)?(?:\W|$)s (?:^|\W)on(?:off|on)line(?:\W|$)s(?:^|\W)onoutofsync(?:\W|$)s&(?:^|\W)onoverflow(?:changed)?(?:\W|$)s#(?:^|\W)onpage(?:hide|show)(?:\W|$)s(?:^|\W)onpaint(?:\W|$)s(?:^|\W)onpaste(?:\W|$)s(?:^|\W)onpause(?:\W|$)s6(?:^|\W)onpopup(?:hidden|hiding|showing|shown)(?:\W|$)s(?:^|\W)onprogress(?:\W|$)s (?:^|\W)onpropertychange(?:\W|$)s"(?:^|\W)onradiostatechange(?:\W|$)s"(?:^|\W)onreadystatechange(?:\W|$)s(?:^|\W)onrepeat(?:\W|$)s(?:^|\W)onreset(?:\W|$)s&(?:^|\W)onresize(?:end|start)?(?:\W|$)s(?:^|\W)onresume(?:\W|$)s(?:^|\W)onreverse(?:\W|$)s3(?:^|\W)onrow(?:delete|enter|exit|inserted)(?:\W|$)s/(?:^|\W)onrows(?:delete|enter|inserted)(?:\W|$)s(?:^|\W)onscroll(?:\W|$)s(?:^|\W)onseek(?:\W|$)s"(?:^|\W)onselect(?:start)?(?:\W|$)s!(?:^|\W)onselectionchange(?:\W|$)s(?:^|\W)onstart(?:\W|$)s(?:^|\W)onstop(?:\W|$)s(?:^|\W)onsubmit(?:\W|$)s+(?:^|\W)onsync(?:from|to)preference(?:\W|$)s(?:^|\W)onsyncrestored(?:\W|$)s(?:^|\W)ontext(?:\W|$)s(?:^|\W)ontimeerror(?:\W|$)s(?:^|\W)ontrackchange(?:\W|$)s(?:^|\W)onunderflow(?:\W|$)s(?:^|\W)onurlflip(?:\W|$)s(?:^|\W)seeksegmenttime(?:\W|$)s(?:^|\W)svgabort(?:\W|$)s(?:^|\W)svgerror(?:\W|$)s(?:^|\W)svgload(?:\W|$)s(?:^|\W)svgresize(?:\W|$)s(?:^|\W)svgscroll(?:\W|$)s(?:^|\W)svgunload(?:\W|$)s(?:^|\W)svgzoom(?:\W|$)t|s
[- --�]s,(&#[0-9]+;?)|(&#x[0-9a-f]+;?)|(%[0-9a-f]{2})cCs�|i�i�id�}yJ|id�p|id�ot|dd�}nt|d�}Wntj
odSX|djot|�SdSd S(
s=Translate &#... and %xx encodings into the encoded character.s&#;RR"iii
RiN(tgroupR7R�RIR�R�R.(tmotmatchtval((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt
_translate�s
cCs5titidtit|���otStSdS(sWCheck HTML string for various tags, script language names and
'onxxx' actions that can be used in XSS attacks.
Currently, this a very simple minded test. It just looks for
patterns without analyzing context. Thus, it potentially flags lots
of benign stuff.
Returns True if anything suspicious found, False otherwise.
RN(t_badhtmlRGt_filtercharstsubt
_encodedcharsRPRR(thtml((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pytsuspiciousHTMLs (RoRpReRqRr(RsRtRmRuRvRwRxRyRzRWR{RLR|R}R~RR�(ii(ii(ii(ii(ii(ii(ii(ii(ii(ii(ii(wt__doc__t
__future__RRtsysRR�RR�R�R�R^R6temail.HeaderR9temail.Iteratorstemail.ErrorsRttypesRtstringRRRtImportErrort_lowertuppertMailmanRRR tMailman.SafeDictR
tMailman.Logging.SyslogRthashlibtmd5tmd5_newtsha1R�tshatnewRRt NameErrorR�RER!RgR&tcompilet
IGNORECASER$R(RRR1R4R>RARFRKRNRTRXR6RfRjRnt_vowelst_consonantsR�R}RtR"R�R�tMEMBER_PASSWORD_LENGTHR�R�R�R�R�R�R�R�R�t ExceptionR�R�R�R�R�R�RRR�RR R]RRRR R'R*R,R-R<R?R>RJt _badwordsRRQRRRTRPRV(((sV/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Utils.pyt<module>s�
K
!
o
' .