ajenti / ajenti

Audit required: External control of file name or path PTC-W6004
Security
Minor
6 months ago2 years old
External variable 'path' used in file path
110                encoding = http_context.query.get('encoding', None)
111                if encoding:
112                    content = content.decode('utf-8')
113            with open(path, 'w') as f:114                f.write(content)
115        except OSError as e:
116            raise EndpointError(e)
External variable 'template_path' used in file path
109
110        content = {'plain':'', 'html':''}
111
112        with open(template_path, 'r') as h:113            template = Template(h.read())
114            html = template.render(vars)
115