Warning: Cannot modify header information - headers already sent by (output started at /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp:1) in /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp:1) in /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp:1) in /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp:1) in /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp:1) in /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp:1) in /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp:1) in /home/curativehealthst/public_html/assets/images/portfolio/album/album_Others_0_1789672487.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
 6ic@sdZddlZddlZddlmZddlmZddlmZm Z m Z m Z m Z m Z mZmZmZddlmZddlmZeZeedrdd lmZeZnd Zed d d ddgZedddgZeddgZeddgZ eddgZ!esJeZnddl"Z"e"j#dde$ddddl%m&Z&efZ'e(fZ)e*fZ+yGddl,m,Z,m-Z-ddl.m.Z.e)e,e-f7Z)e'e.f7Z'Wne/k rnXy!dd l0m1Z1e'e1f7Z'Wne/k r)nXyGdd!l%m2Z2m3Z3m4Z4e'e2f7Z'e)e3f7Z)e+e4f7Z+Wne/k rnXe'e5d"d#d$d%d&d'd(d)gfe)e5d#d&d*d+d)gfe+e5d,d-d.d/d0d'gfe&e5d,d1d#d0d2d&d3d'd4g ffZ6eedrCd5efd6YZ7nd7Z8d8Z9d9Z:d:Z;d;efd<YZ<d=e<fd>YZ=erydd?l>m?Z?Wne/k rd@Z?nXdAe@fdBYZAdCeAefdDYZBdEeAe7fdFYZCndS(Gsj jinja2.sandbox ~~~~~~~~~~~~~~ Adds a sandbox layer to Jinja as it was the default behavior in the old Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the default behavior is easier to use. The behavior can be changed by subclassing the environment. :copyright: (c) 2010 by the Jinja Team. :license: BSD. iN(t Environment(t SecurityError( t string_typest function_typet method_typettraceback_typet code_typet frame_typetgenerator_typet text_typetPY2(tMarkup(tupdate_wrappertformat(t Formatterit func_closuret func_codet func_dictt func_defaultst func_globalstim_classtim_functim_selftgi_frametgi_codetcr_frametcr_codetag_codetag_frametignoresthe sets moduletmodulesjinja2.sandbox(tdeque(tUserDictt DictMixin(tUserList(tSet(t MutableSettMutableMappingtMutableSequencetaddtcleartdifference_updatetdiscardtpoptremovetsymmetric_difference_updatetupdatetpopitemt setdefaulttappendtreversetinserttsorttextendt appendleftt extendlefttpoplefttrotatetEscapeFormattercBseZdZdZRS(cCs ||_dS(N(tescape(tselfR;((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyt__init__tscCst|dr!|j|}n`t|drf|rWtdj|t|n|j}ntj||t|}t|j |S(Nt__html_format__t__html__sFormat specifier {0} given, but {1} does not define __html_format__. A class that defines __html__ must define __html_format__ to work with format specifiers.( thasattrR>t ValueErrorR ttypeR?Rt format_fieldR R;(R<tvaluet format_spectrv((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyRCws(t__name__t __module__R=RC(((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyR:ss cGs5t|}t|tkr1tdtn|S(sWA range that can't generate ranges with a length of more than MAX_RANGE items. s+range too big, maximum size for range is %d(trangetlent MAX_RANGEt OverflowError(targstrng((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyt safe_ranges   cCs t|_|S(snMarks a function or method as unsafe. :: @unsafe def delete(self): pass (tTruetunsafe_callable(tf((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pytunsafes cCs%t|tr"|tkrtSnt|trP|tksI|tkrtSnt|trr|dkrtSnt|ttt frtSt|t r|t krtSnht t drt|t jr|tkrtSn4t t drt|t jrttkrtSn|jdS(s Test if the attribute given is an internal python attribute. For example this function returns `True` for the `func_code` attribute of python objects. This is useful if the environment method :meth:`~SandboxedEnvironment.is_safe_attribute` is overridden. >>> from jinja2.sandbox import is_internal_attribute >>> is_internal_attribute(lambda: None, "func_code") True >>> is_internal_attribute((lambda x:x).func_code, 'co_code') True >>> is_internal_attribute(str, "upper") False tmrot CoroutineTypetAsyncGeneratorTypet__(t isinstanceRtUNSAFE_FUNCTION_ATTRIBUTESRPRtUNSAFE_METHOD_ATTRIBUTESRBRRRRtUNSAFE_GENERATOR_ATTRIBUTESR@ttypesRUtUNSAFE_COROUTINE_ATTRIBUTESRVtattrit!UNSAFE_ASYNC_GENERATOR_ATTRIBUTESt startswith(tobjtattr((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pytis_internal_attributes,     ! ! cCs4x-tD]%\}}t||r||kSqWtS(sThis function checks if an attribute on a builtin mutable object (list, dict, set or deque) would modify it if called. It also supports the "user"-versions of the objects (`sets.Set`, `UserDict.*` etc.) and with Python 2.6 onwards the abstract base classes `MutableSet`, `MutableMapping`, and `MutableSequence`. >>> modifies_known_mutable({}, "clear") True >>> modifies_known_mutable({}, "keys") False >>> modifies_known_mutable([], "append") True >>> modifies_known_mutable([], "index") False If called with an unsupported object (such as unicode) `False` is returned. >>> modifies_known_mutable("foo", "upper") False (t _mutable_specRXtFalse(RaRbttypespecRS((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pytmodifies_known_mutablestSandboxedEnvironmentcBseZdZeZiejd6ejd6ejd6ej d6ej d6ej d6ej d6Z iejd6ejd6ZeZeZdZd Zd Zd Zd Zd ZdZdZdZdZdZRS(sThe sandboxed environment. It works like the regular environment but tells the compiler to generate sandboxed code. Additionally subclasses of this environment may override the methods that tell the runtime what attributes or functions are safe to access. If the template tries to access insecure code a :exc:`SecurityError` is raised. However also other exceptions may occur during the rendering so the caller has to ensure that all exceptions are caught. t+t-t*t/s//s**t%cCstS(sCalled during template compilation with the name of a unary operator to check if it should be intercepted at runtime. If this method returns `True`, :meth:`call_unop` is excuted for this unary operator. The default implementation of :meth:`call_unop` will use the :attr:`unop_table` dictionary to perform the operator with the same logic as the builtin one. The following unary operators are interceptable: ``+`` and ``-`` Intercepted calls are always slower than the native operator call, so make sure only to intercept the ones you are interested in. .. versionadded:: 2.6 (Re(R<toperator((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pytintercept_unop&scOsHtj|||t|jd<|jj|_|jj|_dS(NRI( RR=ROtglobalstdefault_binop_tabletcopyt binop_tabletdefault_unop_tablet unop_table(R<RMtkwargs((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyR=8s cCs|jdpt|| S(sYThe sandboxed environment will call this method to check if the attribute of an object is safe to access. Per default all attributes starting with an underscore are considered private as well as the special attributes of internal python objects as returned by the :func:`is_internal_attribute` function. t_(R`Rc(R<RaRbRD((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pytis_safe_attribute>scCs#t|dtp!t|dt S(sCheck if an object is safely callable. Per default a function is considered safe unless the `unsafe_callable` attribute exists and is True. Override this method to alter the behavior, but this won't affect the `unsafe` decorator from this module. RQt alters_data(tgetattrRe(R<Ra((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pytis_safe_callableGscCs|j|||S(sFor intercepted binary operator calls (:meth:`intercepted_binops`) this function is executed instead of the builtin operator. This can be used to fine tune the behavior of certain operators. .. versionadded:: 2.6 (Rs(R<tcontextRntlefttright((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyt call_binopPscCs|j||S(sFor intercepted unary operator calls (:meth:`intercepted_unops`) this function is executed instead of the builtin operator. This can be used to fine tune the behavior of certain operators. .. versionadded:: 2.6 (Ru(R<R|Rntarg((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyt call_unopYscCsy ||SWnttfk rt|tryt|}Wntk rTqXyt||}Wntk r{qX|j|}|dk r|S|j |||r|S|j ||SqnX|j d|d|S(s(Subscribe an object from sandboxed code.RatnameN( t TypeErrort LookupErrorRXRtstrt ExceptionRztAttributeErrortwrap_str_formattNoneRxtunsafe_undefinedt undefined(R<RatargumentRbRDtfmt((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pytgetitembs&    cCsyt||}Wn7tk rLy ||SWqttfk rHqXnIX|j|}|dk rl|S|j|||r|S|j||S|jd|d|S(sSubscribe an object from sandboxed code and prefer the attribute. The attribute passed *must* be a bytestring. RaRN( RzRRRRRRxRR(R<Rat attributeRDR((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyRzzs   cCs/|jd||jjfd|d|dtS(s1Return an undefined object for unsafe attributes.s.access to attribute %r of %r object is unsafe.RRatexc(Rt __class__RGR(R<RaR((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyRs cst|tjtjf s+|jdkr/dS|jttsKdStd}tt rt |j }n t |}|j fd}t||S(s(If the given value is a ``str.format`` method, return a new function that handles sandboxing. This is done at access rather than in :meth:`call`, so that calls made without ``call`` are also sandboxed. Note: Python 2 only supports str.format, not str.format_map. R cs||S(N((RMRv(tf_selftstr_typetvformat(s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pytwrappersN(RXR\t MethodTypetBuiltinMethodTypeRGRt__self__RRBR tSandboxedEscapeFormatterR;tSandboxedFormatterRR (R<RDt formatterR((RRRs2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyRs    cOs8|j|s%td|fn|j|||S(s#Call an object from sandboxed code.s%r is not safely callable(R{Rtcall(t_SandboxedEnvironment__selft_SandboxedEnvironment__contextt_SandboxedEnvironment__objRMRv((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyRs(RGRHt__doc__RPt sandboxedRnR'tsubtmulttruedivtfloordivtpowtmodRqtpostnegRtt frozensettintercepted_binopstintercepted_unopsRoR=RxR{RRRRzRRR(((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyRhs4                  tImmutableSandboxedEnvironmentcBseZdZdZRS(sWorks exactly like the regular `SandboxedEnvironment` but does not permit modifications on the builtin mutable objects `list`, `set`, and `dict` by using the :func:`modifies_known_mutable` function. cCs*tj||||stSt|| S(N(RhRxReRg(R<RaRbRD((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyRxs(RGRHRRx(((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyRs(tformatter_field_name_splitcCs |jS(N(t_formatter_field_name_split(t field_name((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyRstSandboxedFormatterMixincBseZdZdZRS(cCs ||_dS(N(t_env(R<tenv((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyR=sc Cs{t|\}}|j|||}xG|D]?\}}|rX|jj||}q.|jj||}q.W||fS(N(Rt get_valueRRzR( R<RRMRvtfirsttrestRatis_attrti((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyt get_fields(RGRHR=R(((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyRs RcBseZdZRS(cCs!tj||tj|dS(N(RR=R(R<R((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyR=s(RGRHR=(((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyRsRcBseZdZRS(cCs$tj||tj||dS(N(RR=R:(R<RR;((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyR=s(RGRHR=(((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyRs(DRR\Rntjinja2.environmentRtjinja2.exceptionsRtjinja2._compatRRRRRRRR R t jinja2.utilsR t functoolsR Ret has_formatR@tstringRRPRKtsetRYRZR[R]R_twarningstfilterwarningstDeprecationWarningt collectionsRt_mutable_set_typestdictt_mutable_mapping_typestlistt_mutable_sequence_typesR R!R"t ImportErrortsetsR#R$R%R&RRdR:RORSRcRgRhRt_stringRtobjectRRR(((s2/usr/lib/python2.7/site-packages/jinja2/sandbox.pyts  @              &