Non-alphanumeric Characters in Filename & Old File Removal
Summary
- When uploading a fanlisting's affiliate's image that has non-alphanumeric characters (possibly with the exception of spaces) in its filename, a Forbidden error is encountered.
- When replacing a fanlisting's affiliate's image, the old image is not deleted from the server.
Steps to reproduce
Issue 1
- Add a fanlisting affiliate image whose filename has non-alphanumeric characters (e.g. thor's hammer).
Issue 2
- Replace a fanlisting affiliate's existing image.
PHP version
7.4.12
What is the current bug behavior?
Issue 1
- A Forbidden error is encountered.
Issue 2
- The old image is not deleted from the server.
What is the expected correct behavior?
Issue 1
- Filename should be sanitized.
Issue 2
- Old image should be deleted from the server.
Logs
These may be happening in other places where an image upload is possible.
Edited by Nelson Aclan