{"data":{"id":"magento2-39502","source":"github-pr","sourceRef":"magento/magento2#39502","title":"Media gallery displays incorrect images from directories with identical names but different case","pr":{"number":39502,"url":"https://github.com/magento/magento2/pull/39502","author":"bhushan-cs","mergedAt":"2025-11-20T15:18:19Z","mergeCommit":"fd43645fda144da3f7c6ffc2f90e7ecbc886abcb","headCommit":"4737be609920d070e32ac8513928a4cbca955d72","baseRef":"2.4-develop","diffSha256":"d29437ee2d0f94172f3e9c4c54540004d41887919e70b6f46cc8f95028057e97"},"issues":[{"number":39382,"url":"https://github.com/magento/magento2/issues/39382","title":"Media gallery displays incorrect images from directories with identical names but different case","labels":["Area: Content / CMS","Component: MediaGallery","Issue: Confirmed","Priority: P2","Progress: PR in progress","Progress: done","Reported on 2.4.7","Reproduced on 2.4.x"],"kind":"human"}],"fixedIn":"2.4.9","containingTags":["2.4.9"],"reportedOn":"2.4.7","codeMatch":{"2.4.6":"clean","2.4.6-p1":"clean","2.4.6-p2":"clean","2.4.6-p3":"clean","2.4.6-p4":"clean","2.4.6-p5":"clean","2.4.6-p6":"clean","2.4.6-p7":"clean","2.4.6-p8":"clean","2.4.6-p9":"clean","2.4.6-p10":"clean","2.4.6-p11":"clean","2.4.6-p12":"clean","2.4.6-p13":"clean","2.4.6-p14":"clean","2.4.6-p15":"clean","2.4.7":"clean","2.4.7-p1":"clean","2.4.7-p2":"clean","2.4.7-p3":"clean","2.4.7-p4":"clean","2.4.7-p5":"clean","2.4.7-p6":"clean","2.4.7-p7":"clean","2.4.7-p8":"clean","2.4.7-p9":"clean","2.4.7-p10":"clean","2.4.8":"clean","2.4.8-p1":"clean","2.4.8-p2":"clean","2.4.8-p3":"clean","2.4.8-p4":"clean","2.4.8-p5":"clean","2.4.9":"conflict"},"affectedVersions":["2.4.6","2.4.6-p1","2.4.6-p2","2.4.6-p3","2.4.6-p4","2.4.6-p5","2.4.6-p6","2.4.6-p7","2.4.6-p8","2.4.6-p9","2.4.6-p10","2.4.6-p11","2.4.6-p12","2.4.6-p13","2.4.6-p14","2.4.6-p15","2.4.7","2.4.7-p1","2.4.7-p2","2.4.7-p3","2.4.7-p4","2.4.7-p5","2.4.7-p6","2.4.7-p7","2.4.7-p8","2.4.7-p9","2.4.7-p10","2.4.8","2.4.8-p1","2.4.8-p2","2.4.8-p3","2.4.8-p4","2.4.8-p5"],"components":["magento/module-media-gallery-ui"],"files":[{"path":"app/code/Magento/MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/Directory.php","change":"modified","package":"magento/module-media-gallery-ui"}],"stripped":{"tests":["app/code/Magento/MediaGalleryUi/Test/Integration/Model/SearchCriteria/CollectionProcessor/FilterProcessor/DirectoryIntegrationTest.php","app/code/Magento/MediaGalleryUi/Test/Unit/Model/SearchCriteria/CollectionProcessor/FilterProcessor/DirectoryTest.php"],"docs":[],"outsideCode":[]},"linesChanged":36,"mergeBatched":false,"excluded":null,"sections":{"description":"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.","stepsToReproduce":"1. Create folder \"Testing\"\n2. Upload file \"logo.png\" to \"Testing\" folder\n3. Create folder \"testing\"\n4. \"logo.png\" file will show in \"testing\" folder","expectedResult":"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.","actualResult":"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.","source":"issue"},"signatures":[],"labels":{"area":["Content / CMS"],"component":["MediaGallery"],"priority":"P2","severity":null,"reportedOn":["2.4.7"]},"categories":["Content"],"triage":{"model":"@cf/cloudflare/clef","requestHash":"c8104dfd240479fb51f80f3df3ebd23640d702c63ed9642026003388abc69265","isBugfix":0.9805,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9593,"feature":0.0057,"refactor":0.0109,"tests_only":0.0097,"docs_only":0.0031,"dependency":0.0033,"cleanup":0.008},"confidence":0.9072},"scope":{"score":0.8895,"probabilities":{"0":0.3269,"1":0.4568,"2":0.2163},"confidence":0.0435},"risk":{"score":0.3033,"probabilities":{"0":0.7445,"1":0.2076,"2":0.0479},"confidence":0.3996},"area":{"choice":"admin","probabilities":{"catalog":0.0619,"checkout":0.0139,"customer":0.014,"admin":0.6593,"graphql_api":0.0223,"framework":0.043,"frontend":0.0432,"other":0.1424},"confidence":0.3868},"securityRelevant":0.0083,"reportedVersion":{"choice":"2.4.7","probabilities":{"2.4.0":0.0023,"2.4.0-p1":0.0024,"2.4.1":0.0021,"2.4.1-p1":0.0022,"2.4.2":0.0023,"2.4.2-p1":0.0023,"2.4.2-p2":0.0027,"2.4.3":0.0028,"2.4.3-p1":0.003,"2.4.3-p2":0.0035,"2.4.3-p3":0.0033,"2.4.4":0.0028,"2.4.4-p1":0.0027,"2.4.4-p10":0.0031,"2.4.4-p11":0.0037,"2.4.4-p12":0.0035,"2.4.4-p13":0.0036,"2.4.4-p14":0.0036,"2.4.4-p15":0.0032,"2.4.4-p16":0.0029,"2.4.4-p17":0.0033,"2.4.4-p18":0.0026,"2.4.4-p2":0.002,"2.4.4-p3":0.0023,"2.4.4-p4":0.0023,"2.4.4-p5":0.0027,"2.4.4-p6":0.0031,"2.4.4-p7":0.0035,"2.4.4-p8":0.0026,"2.4.4-p9":0.0025,"2.4.5":0.0028,"2.4.5-p1":0.0026,"2.4.5-p10":0.0026,"2.4.5-p11":0.0029,"2.4.5-p12":0.0042,"2.4.5-p13":0.0035,"2.4.5-p14":0.0039,"2.4.5-p15":0.0027,"2.4.5-p16":0.0041,"2.4.5-p17":0.0032,"2.4.5-p2":0.0023,"2.4.5-p3":0.0026,"2.4.5-p4":0.0027,"2.4.5-p5":0.0028,"2.4.5-p6":0.004,"2.4.5-p7":0.0038,"2.4.5-p8":0.0029,"2.4.5-p9":0.0023,"2.4.6":0.0074,"2.4.6-p1":0.0105,"2.4.6-p10":0.0069,"2.4.6-p11":0.008,"2.4.6-p12":0.0066,"2.4.6-p13":0.0058,"2.4.6-p14":0.0064,"2.4.6-p15":0.0054,"2.4.6-p2":0.0027,"2.4.6-p3":0.0042,"2.4.6-p4":0.0053,"2.4.6-p5":0.005,"2.4.6-p6":0.0061,"2.4.6-p7":0.0061,"2.4.6-p8":0.0041,"2.4.6-p9":0.0032,"2.4.7":0.5808,"2.4.7-p1":0.0309,"2.4.7-p10":0.011,"2.4.7-p2":0.0118,"2.4.7-p3":0.0118,"2.4.7-p4":0.0118,"2.4.7-p5":0.0094,"2.4.7-p6":0.0119,"2.4.7-p7":0.0125,"2.4.7-p8":0.009,"2.4.7-p9":0.0067,"2.4.8":0.007,"2.4.8-p1":0.0071,"2.4.8-p2":0.0071,"2.4.8-p3":0.0069,"2.4.8-p4":0.0068,"2.4.8-p5":0.0066,"2.4.9":0.007,"unspecified":0.0094},"confidence":0.3327},"backportWorthy":{"score":1.4317,"probabilities":{"0":0.1644,"1":0.2395,"2":0.5961},"confidence":0.1596}},"curated":{"title":"Fixes Media Gallery images visible in directories with different case names","description":"Files uploaded to a directory in the Media Gallery are also visible in directories with similar names but different case, for example \"Testing\" and \"testing\". The Directory filter in MediaGalleryUi now uses a BINARY path REGEXP for case-sensitive path filtering, with a logger error and a case-insensitive fallback if BINARY REGEXP is not supported.","categories":["Content"],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":{"2.4.8-p5":{"before":"fail","after":"pass","adapted":false,"runAt":"2026-10-06T09:25:08.741Z","releaseCommit":"870a22c63d9d9b68fa3297962e2d5d5841115814","suites":{"unit":{"before":"fail","after":"pass","runAt":"2026-10-06T09:25:08.741Z"},"integration":{"before":"fail","after":"pass","runAt":"2026-10-06T09:25:08.741Z"}}},"2.4.7-p10":{"before":"fail","after":"pass","adapted":false,"runAt":"2026-10-06T09:48:38.753Z","releaseCommit":"72561bf80652f57cc642a03e2c9a51d74a285b14","suites":{"unit":{"before":"fail","after":"pass","runAt":"2026-10-06T09:48:38.753Z"},"integration":{"before":"fail","after":"pass","runAt":"2026-10-06T09:48:38.753Z"}}}}},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-39502 details"}