Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(41)  |  Call(30)  |  Derive(0)  |  Import(11)

src/z/o/Zope2-2.13.22/src/ZPublisher/HTTPRequest.py   Zope2(Download)
from zope.publisher.interfaces.browser import IBrowserRequest
 
from AccessControl.tainted import TaintedString
from ZPublisher.BaseRequest import BaseRequest
from ZPublisher.BaseRequest import quote
                istainted = 0
                if '<' in k:
                    k = TaintedString(k)
                    istainted = 1
                if '<' in v:
                    v = TaintedString(v)
                tainted_key = key
                if '<' in key:
                    tainted_key = TaintedString(key)
 
                if flags:
                        tainted_key = key
                        if '<' in key:
                            tainted_key = TaintedString(key)
 
                        # Attributes cannot hold a <.

src/z/o/Zope-HEAD/src/ZPublisher/HTTPRequest.py   Zope(Download)
from zope.publisher.interfaces.browser import IBrowserRequest
 
from AccessControl.tainted import TaintedString
from ZPublisher.BaseRequest import BaseRequest
from ZPublisher.BaseRequest import quote
                istainted = 0
                if '<' in k:
                    k = TaintedString(k)
                    istainted = 1
                if '<' in v:
                    v = TaintedString(v)
                tainted_key = key
                if '<' in key:
                    tainted_key = TaintedString(key)
 
                if flags:
                        tainted_key = key
                        if '<' in key:
                            tainted_key = TaintedString(key)
 
                        # Attributes cannot hold a <.

src/d/o/DocumentTemplate-2.13.2/src/DocumentTemplate/DT_Var.py   DocumentTemplate(Download)
 
from Acquisition import aq_base
from AccessControl.tainted import TaintedString
from zope.structuredtext.document import DocumentWithImages
 
                    else:
                        if isinstance(val, TaintedString):
                            val = TaintedString(fmt % val)
                        else:
                            val = fmt % val
                else:
                    if isinstance(val, TaintedString):
                        val = TaintedString(fmt % val)
                    else:
                        val = fmt % val
            val = ('%'+self.fmt) % (val,)
            if wastainted and '<' in val:
                val = TaintedString(val)
 
        # next, look for upper, lower, etc

src/d/o/DocumentTemplate-2.13.2/src/DocumentTemplate/DT_Util.py   DocumentTemplate(Download)
from types import FunctionType
 
from AccessControl.tainted import TaintedString
from AccessControl.ZopeGuards import _safe_globals
from RestrictedPython.Guards import safe_builtins
        retval = self._method(*args, **kw)
        if tainted and isinstance(retval, str) and '<' in retval:
            retval = TaintedString(retval)
        return retval
 

src/z/o/Zope2-2.13.22/src/OFS/DTMLMethod.py   Zope2(Download)
from AccessControl.Permissions import ftp_access
from AccessControl.requestmethod import requestmethod
from AccessControl.tainted import TaintedString
from DocumentTemplate.permissions import change_dtml_methods
from DocumentTemplate.security import RestrictedDTML

src/z/o/Zope-HEAD/src/OFS/DTMLMethod.py   Zope(Download)
from AccessControl.Permissions import ftp_access
from AccessControl.requestmethod import requestmethod
from AccessControl.tainted import TaintedString
from DocumentTemplate.permissions import change_dtml_methods
from DocumentTemplate.security import RestrictedDTML

src/z/o/Zope-HEAD/src/OFS/tests/test_DTMLMethod.py   Zope(Download)
    def test_edit_taintedstring(self):
        from AccessControl.tainted import TaintedString
        doc = self._makeOne()
        self.assertEquals(doc.read(), '')
        data = TaintedString('hello<br/>')

src/z/o/Zope-HEAD/src/OFS/tests/testSimpleItem.py   Zope(Download)
    def test_raise_StandardErrorMessage_TaintedString_errorValue(self):
        from AccessControl.tainted import TaintedString
        class REQUEST(object):
            class RESPONSE(object):
                handle_errors = True
            item.raise_standardErrorMessage(
                            error_type=OverflowError,
                            error_value=TaintedString('<simple>'),
                            REQUEST=REQUEST(),
                            )

src/a/c/AccessControl-3.0.8/src/AccessControl/tests/test_tainted.py   AccessControl(Download)
    def _getClass(self):
        from AccessControl.tainted import TaintedString
        return TaintedString
 
    def testStr(self):

src/z/o/Zope2-2.13.22/src/OFS/tests/test_DTMLMethod.py   Zope2(Download)
    def test_edit_taintedstring(self):
        from AccessControl.tainted import TaintedString
        doc = self._makeOne()
        self.assertEquals(doc.read(), '')
        data = TaintedString('hello<br/>')

  1 | 2  Next