revolution icon indicating copy to clipboard operation
revolution copied to clipboard

File with two dots in name can be uploaded, but not deleted

Open sebastian-marinescu opened this issue 6 years ago • 3 comments

Bug report

Summary

The MODX media-manager allows uploading of files with two dots ("..") in the filename, but deleting it is impossible.

Step to reproduce

Create a txt-file with the name datei-mit_zwei..punkten.txt. Upload it via media-manager. Try to delete it afterwards.

Observed behavior

Trying to delete it throws an error: image (the error says: "Please provide a valid directory")

Expected behavior

It should either not allow uploading such files in the first place, or if it does, make sure it can be deleted.

Environment

MODX 2.7.0-pl

sebastian-marinescu avatar Feb 01 '19 11:02 sebastian-marinescu

Same story for files uploaded with "?" or "&" in the file name. Isn't there some way we can prevent bad characters from being used in upload file names?

SnowCreative avatar May 13 '20 16:05 SnowCreative

Possibly related with https://github.com/modxcms/revolution/issues/15271

Ruslan-Aleev avatar Oct 06 '20 16:10 Ruslan-Aleev

Just tested it in v2.8.5 and v3.0.2.

It still doesn't work. The original filename is: datei-mit-2..-punkten.txt

In v2.8.5 it doesn't find the file and it looks like it strips both dots .. from the filename. It also looks like MODX thinks it is a directory. image

In v3.0.2 it doesn't find the file and it looks like it strips one dot . from the filename. image

Could be related to https://github.com/modxcms/revolution/issues/16351

sebastian-marinescu avatar Jun 05 '23 13:06 sebastian-marinescu