ajenti / ajenti

Hardcoded temporary directory detected BAN-B108
Security
Major
6 months ago2 years old
Probable insecure usage of temp file/directory.
 40
 41
 42class TestFilesystem:
 43    dir = '/tmp/ajenti-filesystem-test' 44
 45    def path(self, p):
 46        return os.path.join(self.dir, p)
Probable insecure usage of temp file/directory.
188            name = file['name']
189            path = file['path']
190            id = file['id']
191            chunk_dir = f'/tmp/upload-{id}'192
193            target = os.path.join(path, name.replace('/', ''))
194            with open(target, 'wb') as f:
Probable insecure usage of temp file/directory.
154
155        id = http_context.query['flowIdentifier']
156        chunk_index = http_context.query['flowChunkNumber']
157        chunk_dir = f'/tmp/upload-{id}'158        try:
159            os.makedirs(chunk_dir)
160        except Exception as e:
Probable insecure usage of temp file/directory.
128
129        id = http_context.query['flowIdentifier']
130        chunk_index = http_context.query['flowChunkNumber']
131        chunk_dir = f'/tmp/upload-{id}'132        try:
133            os.makedirs(chunk_dir)
134        except Exception as e: