Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media browser filename containing "&" issues. #13412

Closed
BigBlockStudios opened this issue Apr 7, 2017 · 10 comments · Fixed by #16609
Closed

Media browser filename containing "&" issues. #13412

BigBlockStudios opened this issue Apr 7, 2017 · 10 comments · Fixed by #16609
Assignees
Labels
area-core bug The issue in the code or project, which should be addressed.

Comments

@BigBlockStudios
Copy link

Summary

Users can upload but rename or delete files containing linux metacharacters (&) in the file name. only tested the ampersand (&).
Trying to rename the file results in an error: The webserver does not have the necessary permissions to update the directory.
Try to delete the file gives error: Please specify a valid directory.: /vhome/accordfinancial.com/httpdocs/assets/AAA&AAA.pdf

file had to be manually removed VIA the shell

Step to reproduce

Upload and try to manipulate a file with "&" in the name.

Environment

Modx Version 2.5.4 running on centOS 6xx
PHP Version 5.4.45

@BigBlockStudios
Copy link
Author

just tried updating a different site & uploading/managing files with metacharacters in it - same problem exists in 2.5.6

@mrhaw
Copy link
Contributor

mrhaw commented Apr 12, 2017

@mindeffects
Copy link
Contributor

It's a different thing but having "#" or "+" inside the filename break the image preview thumbnail. But renaming is possible.

@OptimusCrime
Copy link
Contributor

I am pretty sure a # in the name will break it no matter what, as the anchor tag has a special meaning in HTTP.

@meshkov
Copy link
Contributor

meshkov commented Jun 24, 2018

Issue fixed in 3.x.

@alroniks
Copy link
Collaborator

MODX 3 now use flysystem library for dealing with files and it seems that the issue is already fixed (as @meshkov mentioned). I am closing it but feel free to reopen if the issue still actual.

@meshkov
Copy link
Contributor

meshkov commented Jun 25, 2018

Tested it in MODX 3.0 in TV with type image and it is break the image preview in TV.
TV with this images does not work on pages.
7kcndmuer6

@alroniks
Copy link
Collaborator

Hi @meshkov Does it mean that we should reopen the issue?

@meshkov
Copy link
Contributor

meshkov commented Jun 26, 2018

Hi @alroniks yes, but it problem with TV, not with media browser. Maybe new issue?

@alroniks
Copy link
Collaborator

TV utilize media browser so it is related. Reopened.

@alroniks alroniks reopened this Jun 26, 2018
@JoshuaLuckers JoshuaLuckers added bug The issue in the code or project, which should be addressed. area-core labels Dec 17, 2018
@smg6511 smg6511 self-assigned this Sep 27, 2023
opengeek pushed a commit that referenced this issue Sep 3, 2024
…16609)

### What does it do?
URL encodes the src property used in building the image TV type’s
phpthumb preview link.

### Why is it needed?
The unencoded property was mangling the request when an ampersand was
present in the file source path, preventing the creation of preview
images.

### How to test

1. Create at least one folder and one image with '&' in the name.
2. Create an image TV, assign it to a Template/Resource, and select the
images you’ve created via the TV.
3. Verify that the preview shows and also shown when selecting a
different image via the TV.

### Related issue(s)/PR(s)
For 3.x:
Resolves #14264
Resolves #13412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core bug The issue in the code or project, which should be addressed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants