revolution icon indicating copy to clipboard operation
revolution copied to clipboard

Change sanitize behavior for files with two dots in filename

Open tolanych opened this issue 6 years ago • 6 comments

What does it do?

For files uploaded via media-manager name with two or more dots will sanitize as when creating file. UPD: Change behavior. Now sanitize path before filename and allow filename had two dots. Update related browser/file processors.

Why is it needed?

To avoid the mistake like described in issue (cannot be removed). And for consistency with behavior creating file.

Related issue(s)/PR(s)

This fixes issue #14320

tolanych avatar Feb 05 '19 14:02 tolanych

Files are renamed when they are loaded, but files with two dots in the name cannot be deleted if they are not loaded via the file manager (for example, via ftp).

Ruslan-Aleev avatar Feb 09 '19 14:02 Ruslan-Aleev

@Jako Please check the changes.

Ibochkarev avatar Nov 26 '19 02:11 Ibochkarev

@cla-bot check

JoshuaLuckers avatar Jan 22 '20 22:01 JoshuaLuckers

Thank you for your contribution! Before your pull request can be reviewed, please sign the MODX Contributor License Agreement (CLA). This is to make sure MODX has your written permission to distribute projects containing your contributions under the appropriate license.

Please make sure the CLA has been signed for GitHub user(s): @tolanych

Once you've signed, please reply with @cla-bot check to verify and update the status of this pull request.

cla-bot[bot] avatar Jan 22 '20 22:01 cla-bot[bot]

The cla-bot has been summoned, and re-checked this pull request!

cla-bot[bot] avatar Jan 22 '20 22:01 cla-bot[bot]

Shouldn't the sanitizer also remove characters like ampersand and pound sign? Those cause problems as well, and shouldn't be allowed in file names. I have clients who upload files like this all the time and then ask me why linking to these files on their websites doesn't work. See also #13412

SnowCreative avatar Jun 10 '20 15:06 SnowCreative