-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 gallery displays incorrect images from directories with identical names but different case #39382
Comments
Hi @bhushan-cs. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @bhushan-cs, Thanks for your reporting and collaboration. We have verified the issue in Latest 2.4-develop instance and the issue is not reproducible.Kindly refer the attached video. Screen.Recording.2024-11-20.at.09.34.32.movThe "logo.png" file was exclusively visible within the "Testing" directory. Kindly recheck the issue in Latest 2.4-develop instance and elaborate the steps to reproduce if the issue is still reproducible. Thanks. |
@engcom-Bravo: have you tested this on a Linux operating system, or on macOS or Windows? Because the latter 2 use a filesystem that by default is case insensitive and Linux normally uses filesystems that are case sensitive. That might explain why you can't reproduce it. So please make sure you test this on a system with a case sensitive filesystem. |
Hi @engcom-Bravo, The steps are same as I provided in the report. I didn't get the "could not create directories" error on my instance when creating the directory without case. magento24dev.2024-11-20.13-40.mp4My instance details: The issue is also present in a couple of our live instances, so I think this is not an isolated occurrence. If required, I can provide the server service versions as well. Please let me know if I can provide any other information for the issue verification process. Thanks. |
Hi @bhushan-cs , Thanks for your reporting and collaboration. We have verified the issue in Latest 2.4-develop instance and the issue is not reproducible. Kindly refer the attached screenshot. Steps to reproduce
Thanks. |
Hi @engcom-Delta, Thanks for trying to recreate the issue. Can you please confirm which OS you are using in your test instance? It's plausible, as @hostep also mentioned, that the OS might be playing a part in this issue. I have confirmed that my issue is reproducible on my local Ubuntu and live Debian system, and since both are listed as a supported OS in Magento 2 system requirements, can you please try recreating the issue on the same if you haven't yet? Thanks. |
I agree with @bhushan-cs @engcom-Delta: your video shows you are using macOS, which by default uses a case-insensitive filesystem. |
Hi @bhushan-cs @hostep , Thanks for your reporting and collaboration. Steps to reproduce
Thanks. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-13489 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Delta. Thank you for verifying the issue. |
❌ You don't have permission to export this issue. |
@magento I am working on this |
Hi @bhushan-cs! 👋 |
@magento add to contributors team |
Hi @bhushan-cs! 👋 |
@magento I am working on this |
Preconditions and environment
Steps to reproduce
Expected result
When a file is uploaded to a specific directory, it should only be accessible within that directory. In this case, the "logo.png" file should be exclusively visible within the "Testing" directory.
Actual result
The "logo.png" file is incorrectly displayed within the "testing" directory as well, despite the difference in case. This behavior is unexpected and inconsistent with standard file system behavior.
Additional information
The SQL request that displays the files in media gallery is case insensitive.
Modifying collection query at Magento\MediaGalleryUi\Model\SearchCriteria\CollectionProcessor\FilterProcessor\Directory
$collection->getSelect()->where('path REGEXP ? ', '^' . $value . '/[^\/]*$');
to
$collection->getSelect()->where('BINARY path REGEXP ? ', '^' . $value . '/[^\/]*$');
should fix the issue.
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: