Did I find the right examples for you? yes no

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

        def rpc_tainted(env):
    return env.get(RPC_TAINTED) == True
        


src/w/h/whiff-1.1/whiff/middleware/filePath.py   whiff(Download)
    def __call__(self, env, start_response):
        assert not whiffenv.rpc_tainted(env), "security violation: cannot compute file system path from rpc tainted environment"
        relativePath = self.param_value(self.page, env)
        relativePath = relativePath.strip()
        #pr "absPath unrelativizing", repr(relativePath)

src/w/h/whiff-1.1/whiff/middleware/getResource.py   whiff(Download)
    def __call__(self, env, start_response):
        resourcePathList = self.param_json(self.page, env)
        # prevent tainted access to non-local resources
        if resourcePathList and resourcePathList[0]!="local":
            assert not whiffenv.rpc_tainted(env), "security violation: can't get resource from tainted environment"

src/w/h/whiff-1.1/whiff/middleware/mako/MakoText.py   whiff(Download)
            raise ImportError, "you must install the mako package from http://www.makotemplates.org/ before using the MakoText middleware"
        # since Mako evaluates python code, disallow rpc tainted environments
        assert not whiffenv.rpc_tainted(env), "security violation: can't evaluate Mako template from tainted environment"
        makoTemplateText = self.param_value(self.page, env)
        makoTemplateData = self.param_json(self.data, env)

src/w/h/whiff-1.1/whiff/middleware/mako/MakoFile.py   whiff(Download)
            raise ImportError, "you must install the mako package from http://www.makotemplates.org/ before using the MakoText middleware"
        # since Mako evaluates python code, disallow rpc tainted environments
        assert not whiffenv.rpc_tainted(env), "security violation: can't evaluate Mako template from rpc tainted environment"
        templatePath = self.param_value(self.page, env).strip()
        makoTemplateData = self.param_json(self.data, env)

src/w/h/whiff-1.1/whiff/middleware/putResource.py   whiff(Download)
    def __call__(self, env, start_response):
        resourcePathList = self.param_json(self.path, env)
        # disallow "puts" to all resources except "local"
        if len(resourcePathList)>0 and resourcePathList[0]!="local":
            assert not whiffenv.rpc_tainted(env), "security violation: can't put non-local resource from tainted environment "+repr(resourcePathList)

src/w/h/whiff-1.1/whiff/middleware/putEnvironment.py   whiff(Download)
    def __call__(self, env, start_response):
        name = self.param_value(self.name, env)
        if name.startswith("whiff"):
            assert not whiffenv.rpc_tainted(env), "security: computed env whiff.* names disallowed for rpc's"
        as_json = self.param_json(self.as_json, env)

src/w/h/whiff-1.1/whiff/middleware/importResource.py   whiff(Download)
    def __call__(self, env, start_response):
        assert not whiffenv.rpc_tainted(env), "security violation: can't import resource from tainted environment"
        resourcePathList = self.param_json(self.path, env)
        #root = env.get(whiffenv.ROOT)
        ##pr "root is", root