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.58k stars 9.32k forks source link

The specified path is not allowed #31582

Open kassner opened 3 years ago

kassner commented 3 years ago

Preconditions

  1. Magento 2.3.6; (the error seems to happen on 2.4, but the message is different: The path is not allowed: media/something-invalid.xml)

Steps to reproduce

  1. Make sure the file var/resource_config.json does not exist;
  2. Access {BASEURL}/media/something-invalid.xml;
  3. expected results don't happen;
  4. Now the var_resoruce_config.json file exists is generated;
  5. Access {BASEURL}/media/something-invalid.xml;
  6. expected results happen;

Expected result

  1. 404 error;
  2. No errors logged;

Actual result (*)

  1. 404 error :+1:;
  2. The specified path is not allowed.
    #0 /var/www/magento/vendor/magento/framework/App/Bootstrap.php(261): Magento\MediaStorage\App\Media->launch()
    #1 /var/www/magento/pub/get.php(84): Magento\Framework\App\Bootstrap->run(Object(Magento\MediaStorage\App\Media))
    #2 {main}

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

m2-assistant[bot] commented 3 years ago

Hi @kassner. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

AndyJAllen commented 3 years ago

There's a thread on the Magento forums on this or a similar error...never really got any resolution. Such a vague error. I've been getting a lot of these in my system.log file for a long time and I have no idea how to debug the situation or if its even causing any issues for anyone.

https://community.magento.com/t5/Magento-2-x-Technical-Issues/main-ERROR-The-specified-path-is-not-allowed/m-p/132383

m2-assistant[bot] commented 2 years ago

Hi @engcom-November. 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:

engcom-November commented 2 years ago

Verified the issue on Magento 2.4-develop branch and the issue is reproducible. Accessing the site with url: http:///media/something-invalid.xml giving 404 error but also below error is getting generated in logs. (var/log/system.log) [2022-09-13T10:11:33.372312+00:00] main.ERROR: The path is not allowed: media/something-invalid.xml [] Note: This issue is not observed for other urls ex: http://mg24.local/media/fewffefe.html. No error logs generated. image

github-jira-sync-bot commented 2 years ago

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

m2-assistant[bot] commented 2 years ago

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

engcom-Bravo commented 1 month ago

Hi @kassner,

Thanks for your reporting and collaboration.

We have reverified the issue in Latest 2.4-develop instance and the issue is still reproducible.Kindly refer the screenshots.

Screenshot 2024-10-09 at 14 50 56
#94 /usr/local/var/www/magentok/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#95 /usr/local/var/www/magentok/magento2/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))

Hence Confirming the issue.

Thanks.

github-jira-sync-bot commented 1 month ago

:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-6670