magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.53k stars 9.31k forks source link

Thumbnails for media files containing two dots in name are not generated #38641

Open dudzio12 opened 6 months ago

dudzio12 commented 6 months ago

Preconditions and environment

Steps to reproduce

Expected result

Actual result

Additional information

The issue is in Magento\MediaStorage\Model\File\Storage\Request. I'm not sure why this was implemented 9 years ago:

    /**
     * @param HttpRequest $request
     */
    public function __construct(HttpRequest $request)
    {
        $this->pathInfo = str_replace('..', '', ltrim($request->getPathInfo(), '/'));
    }

Release note

No response

Triage and priority

m2-assistant[bot] commented 6 months ago

Hi @dudzio12. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 6 months ago

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

github-jira-sync-bot commented 6 months ago

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

engcom-Delta commented 6 months ago

Hi @dudzio12 ,

Verified the issue on 2.4-develop and its is reproducible

Hence, Confirming the issue.

Steps to reproduce

1.Login to magento admin 2.Upload image with name containing two dots to product media gallery 3.Verify thumbnails and media cache

Please refer the attached screenshot

Screenshot 2024-04-22 at 7 36 33 PM Screenshot 2024-04-22 at 7 36 51 PM Screenshot 2024-04-22 at 7 37 22 PM Screenshot 2024-04-22 at 7 54 31 PM
github-jira-sync-bot commented 6 months ago

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

github-jira-sync-bot commented 6 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-11845 is successfully created for this GitHub issue.

m2-assistant[bot] commented 6 months ago

:white_check_mark: Confirmed by @engcom-Delta. Thank you for verifying the issue.
Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.