fossasia / open-event-server

Audit required: Use of an insecure method method from urllib detected BAN-B310
Security
Major
5 months ago4 years old
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
309    # Get an unique identifier from uuid if not provided
310    filename = f'{get_file_name()}.{ext}'
311    if image_file:
312        with urllib.request.urlopen(image_file) as img_data:313            image_file = io.BytesIO(img_data.read())
314    else:
315        file_relative_path = 'static/default_system_image.png'