fossasia / open-event-server

Audit required: External control of file name or path PTC-W6004
Security
Minor
5 months ago2 years old
External variable 'file' used in file path
160
161def write_file(file, data):
162    """simple write to file"""
163    fp = open(file, 'w')164    fp.write(str(data, 'utf-8'))
165    fp.close()
166
External variable 'path' used in file path
129        return self.data
130
131    def save(self, path):
132        f = open(path, 'w')133        f.write(str(self.data, 'utf-8'))
134        f.close()
135
External variable 'file_path' used in file path
 95    def __init__(self, file_path, filename):
 96        self.file_path = file_path
 97        self.filename = filename
 98        self.file = open(file_path, 'rb') 99
100    def __len__(self):
101        position = self.file.tell()