Import uploader does not check Content-Disposition header #12455
Labels
Component: ImportExport
Fixed in 2.3.x
The issue has been fixed in 2.3 release line
Issue: Clear Description
Gate 2 Passed. Manual verification of the issue description passed
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Reproduced on 2.1.x
The issue has been reproduced on latest 2.1 release
Reproduced on 2.2.x
The issue has been reproduced on latest 2.2 release
Reproduced on 2.3.x
The issue has been reproduced on latest 2.3 release
Preconditions
Magento 2.2.1 (probably previous versions too, cannot imagine this functionality being removed on purpose)
Steps to reproduce
Create a product import CSV with an image URL (which does not have a proper image extension) leading to an image being force downloaded by HTTP headers (for example: https://gist.github.com/brasofilo/2863355 (example gist))
Import it
Expected result
Actual result
/pub/media/import/httpexamplecomdownloadsomefile
)Problem
Magento\CatalogImportExport\Model\Import\Uploader::move()
sets$fileName
to a stripped version of the URL. Here it should do aMagento\Framework\Filesystem\File\ReadInterface::stat()
on the URL to check if theContent-Disposition
header is set and a filename is provided.The text was updated successfully, but these errors were encountered: