improper sanitization of file name causes upload error

Created on 10 June 2023, almost 2 years ago

Problem/Motivation

When using media library and uploading a file (tested with jpeg and docx) with an illegal character in the filename, in this test a "/" (forward slash), an upload error is produced

The specified file FILENAME.jpeg could not be uploaded.
This value should be of the correct primitive type.

.

The file name listed in the error message shows a ":" (Colon) not a "/" (forward slash). My assumption is upload handler code or media code is improperly sanitizing the filename.

Steps to reproduce

Vanilla install, create a media file field, create a jpeg or docx file with a "/" (forward slash) in the title, try and upload that file. view the renamed filename in the error message as having a colon.

Proposed resolution

change the sanatizing code to turn a "/" (forward slash) into a "-" (Dash) instead of a ":" (Colon).

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

9.5

Component
MediaΒ  β†’

Last updated 4 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States destinationsound

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024