Skip to content
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

CatalogImportExport uploader can't handle HTTPS images #8277

Closed
clementbeudot opened this issue Jan 25, 2017 · 7 comments
Closed

CatalogImportExport uploader can't handle HTTPS images #8277

clementbeudot opened this issue Jan 25, 2017 · 7 comments
Labels
bug report Component: ImportExport Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@clementbeudot
Copy link
Contributor

CatalogImportExport uploader can't handle HTTPS images

In the case we create a product programmatically and want to use the Magento\CatalogImportExport\Model\Uploader class, if the URL of the file contained https, it will still use the HTTP Provider to retrieve the image leading to an error.

Preconditions

Using PHP 5.6, and Magento 2.1.2

Steps to reproduce

Instanciate class Magento\CatalogImportExport\Model\Uploader and try to move an URL with https

Expected result

  1. File should be downloaded with appropriate driver instead of the default HTTP

Actual result

We have an exception

 exception 'Magento\Framework\Exception\FileSystemException' with message 'Fichier "myhttpsfile/6bdc0aa637275ff47b16e87e7535b336.jpg" inexistant' in /var/www/marketplace/vendor/magento/framework/Filesystem/File/Read.php:75
Stack trace:
#0 /var/www/marketplace/vendor/magento/framework/Filesystem/File/Read.php(61): Magento\Framework\Filesystem\File\Read->assertValid()
#1 /var/www/marketplace/vendor/magento/framework/Filesystem/File/Read.php(51): Magento\Framework\Filesystem\File\Read->open()
#2 /var/www/marketplace/vendor/magento/framework/Filesystem/File/ReadFactory.php(40): Magento\Framework\Filesystem\File\Read->__construct('****....', Object(Magento\Framework\Filesystem\Driver\Http))
@clementbeudot
Copy link
Contributor Author

image

image

clementbeudot added a commit to matterstech/magento2 that referenced this issue Jan 25, 2017
clementbeudot added a commit to matterstech/magento2 that referenced this issue Jan 25, 2017
clementbeudot added a commit to matterstech/magento2 that referenced this issue Jan 25, 2017
clementbeudot added a commit to matterstech/magento2 that referenced this issue Jan 25, 2017
@clementbeudot
Copy link
Contributor Author

clementbeudot commented Jan 25, 2017

I have made a pull request to fix it.

@wert2all wert2all added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jan 30, 2017
@wert2all
Copy link
Contributor

Thanks for the feedback. Created internal issue MAGETWO-63835 to investigate and track this issue.

@clementbeudot
Copy link
Contributor Author

Thank you!!!

@okorshenko
Copy link
Contributor

@clementbeudot thank for reporting and fixing the issue! Closing this issue. Pull request has been delivered to develop branch

markpol added a commit to markpol/magento2 that referenced this issue Mar 5, 2017
* MAGETWO-64607: Implement custom provider to collect store and system configuration

* MAGETWO-64608: Configure store and website reports for data collection

* MAGETWO-64612: Implement config for Analytics cron setting

* Create wishlist.js

* Delete wishlist.js

* Update requirejs-config.js

* MAGETWO-64607: Implement custom provider to collect store and system configuration

* MTO-146: [Test] Create offline Order from "Edit Customer" Admin page

- Defects fixed

* MTO-146: [Test] Create offline Order from "Edit Customer" Admin page

- Defects fixed

* MAGETWO-64629: Add plugin for base url change

small refactoring

* MAGETWO-64630: Create cronjob that executes update command

* MAGETWO-64629: Add plugin for base url change

review fixes

* MTO-142: [Test] Captcha on front login

- Defects fixed.

* MTO-142: [Test] Captcha on front login

- Defects fixed.

* MAGETWO-64630: Create cronjob that executes update command

* MAGETWO-63406: [Github] Paypal Payment Order Transaction ID Link will result to 404 not found

- Fixed returned link
- Fixed unit tests

* Update Save.php

If quantity is changed using mass action for attribute changes, but no stock item exists for the product, saving the newly created stockItem in StockItemRepository->save($stockItem) returns without saving the stockItem, since $stockItem->getProductId() is null, due to it being added to the array with key '0' (see line 165). To fix this, the array key has been changed to "product_id", such that StockItemRepository successfully creates the stockItem.
Also, in my opinion, StockItemRepository->save() should not just return without notice, especially as it already encapsulates the functionality in a try/catch block. Throwing an exception would actually tell the user that something went wrong.

* MAGETWO-64630: Create cronjob that executes update command

* MAGETWO-64224: Remove usages of AttributeCache from customer module

- fixing annotation

* MAGETWO-64224: Remove usages of AttributeCache from customer module

- making inheritdoc lowercase

* MTO-146: [Test] Create offline Order from "Edit Customer" Admin page

- Defects fixed

* MAGETWO-64612: Implement config for Analytics cron setting

* MAGETWO-64629: Add plugin for base url change

add secure url check

* MAGETWO-64629: Add plugin for base url change

add secure url check test

* MAGETWO-64802: Implement corrupted data reporting for fieldDataConverter

* MAGETWO-64505: [Integration] Advanced Analytics subscription create API request

add data provider

* MAGETWO-64505: [Integration] Advanced Analytics subscription create API request

* MTO-111: [Test] Update Category if Use Category Flat (Cron is ON, "Update on Save" Mode)

- Defects fixed.

* MTO-113: [Test] Captcha on admin login

- Defects fixed

* MAGETWO-64625: Implement API for file downloading by MA

allow only secure connections for analytics

* MAGETWO-53457: [COMMUNITY] [FEEDBACK] Improve error reporting for failed order placement (checkout) magento#4682

updated unit tests

* MTO-142: [Test] Captcha on front login

- Defects fixed.

* MTO-113: [Test] Captcha on admin login

- Defects fixed

* MTO-146: [Test] Create offline Order from "Edit Customer" Admin page

- Defects fixed

* MAGETWO-64630: Create cronjob that executes update command

* MAGETWO-65047 [GitHub][PR] Refactor contact module magento#8420

- fix code style issues

* MAGETWO-65047 [GitHub][PR] Refactor contact module magento#8420

- fix integrity tests issues

* MAGETWO-65047 [GitHub][PR] Refactor contact module magento#8420

- fix integration tests

* MAGETWO-64902: [GitHub][PR] bug magento#8277 fixing bug with https downloading. magento#8278

* MAGETWO-64775: [GitHub] [PR] Make "is_required" and "is_visible" properties of telephone, company and fax attributes of addresses configurable magento#8519

- fix unit and integration tests

* MTO-146: [Test] Create offline Order from "Edit Customer" Admin page

- Defects fixed

* MAGETWO-64802: Implement corrupted data reporting for fieldDataConverter

* MAGETWO-64625: Implement API for file downloading by MA

add base64 encoding for transferring binary vector

* MTO-146: [Test] Create offline Order from "Edit Customer" Admin page

- Defects fixed

* MAGETWO-64613: Implement service to enrypt collected data

* MAGETWO-64775: [GitHub] [PR] Make "is_required" and "is_visible" properties of telephone, company and fax attributes of addresses configurable magento#8519

- fix unit tests

* MAGETWO-64613: Implement service to enrypt collected data

* MAGETWO-64609: Extend modules report for data colection

* MAGETWO-64802: Implement corrupted data reporting for fieldDataConverter

* MAGETWO-64802: Implement corrupted data reporting for fieldDataConverter

- covered skipping already converted data with integration test

* MAGETWO-64608: Configure store and website reports for data collection

* MAGETWO-64613: Implement service to enrypt collected data

* MAGETWO-64505: [Integration] Advanced Analytics subscription create API request

-- fix test

* MAGETWO-62322: Performance Profile Generator

* MAGETWO-62322: Performance Profile Generator

* Add correct return type in order service

The method return $this. I corrected the doc-block.

* MAGETWO-64625: Implement API for file downloading by MA

fix tests

* MAGETWO-62549: Collect Data by cron and encrypt file

-- fix code style

* MAGETWO-64625: Implement API for file downloading by MA

allow only secure connections for analytics

* MAGETWO-62549: Collect Data by cron and encrypt file

-- fix code style

* MAGETWO-64802: Implement corrupted data reporting for fieldDataConverter

* MTO-146: [Test] Create offline Order from "Edit Customer" Admin page

- Issue added to variation

* MTO-146: [Test] Create offline Order from "Edit Customer" Admin page

- Defects fixed

* MAGETWO-64626: Web API test for file export

edit test for run on http

* MAGETWO-65006: [GitHub][PR] Keep transparency when resizing images magento#7307

 - fix is created based on public pull request magento#7307 by @kassner
 - closing magento#7307

* MAGETWO-51176: ST compiler supplies ObjectManagerInterface to direct third party dependencies

* Fixed Doc Block for the dispatch method of the Rest Controller

- provided more information on how dispatch method handles the Request

* remove unused ComponentRegistrar instance from being passed to Populator::populateMappings

* Fixed return type of OrderRepository::getList

* MAGETWO-64802: Implement corrupted data reporting for fieldDataConverter

- custom converters coverage

* MAGETWO-64626: Web API test for file export

edit test for run on http

* MTO-146: [Test] Create offline Order from "Edit Customer" Admin page

- Defects fixed

* MAGETWO-64626: Web API test for file export

edit test for run on http

* MAGETWO-64626: Web API test for file export

allow only secure connections for analytics

* MTO-111: [Test] Update Category if Use Category Flat (Cron is ON, "Update on Save" Mode)

- Duplicated new line removed.

* MAGETWO-64626: Web API test for file export

edit test for run on http

* MTO-146: [Test] Create offline Order from "Edit Customer" Admin page

- Defects fixed

* MAGETWO-64802: Implement corrupted data reporting for fieldDataConverter

- custom converters
- fixed integration test and removed dependency

* MTO-142: [Test] Captcha on front login

- Defects fixed.

* MAGETWO-64796: Added fixture for Customer module with assigned website

* MAGETWO-64601: [Integration] report page API request for Advanced analytics

* MAGETWO-61095: When attempting to place a reorder after a product is disabled, product still gets added to the cart

* MAGETWO-61095: When attempting to place a reorder after a product is disabled, product still gets added to the cart

* MAGETWO-61095: When attempting to place a reorder after a product is disabled, product still gets added to the cart

* MAGETWO-61095: When attempting to place a reorder after a product is disabled, product still gets added to the cart

* MAGETWO-61095: When attempting to place a reorder after a product is disabled, product still gets added to the cart

* MAGETWO-61095: When attempting to place a reorder after a product is disabled, product still gets added to the cart

* MAGETWO-61095: When attempting to place a reorder after a product is disabled, product still gets added to the cart

* MAGETWO-61095: When attempting to place a reorder after a product is disabled, product still gets added to the cart

* MAGETWO-61095: When attempting to place a reorder after a product is disabled, product still gets added to the cart

* MAGETWO-61095: When attempting to place a reorder after a product is disabled, product still gets added to the cart

* MAGETWO-64515: change comment in file due to PR risk

* MAGETWO-64515: change comment in file due to PR risk

* MAGETWO-62168: Improve field data converter logging and error reporting

* MAGETWO-62168: Improve field data converter logging and error reporting

* MAGETWO-62168: Improve field data converter logging and error reporting

* MAGETWO-62168: Improve field data converter logging and error reporting

* MAGETWO-62168: Improve field data converter logging and error reporting

* MAGETWO-62168: Improve field data converter logging and error reporting
@magento-team magento-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Component: ImportExport labels Jul 31, 2017
@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-64902

@clementbeudot
Copy link
Contributor Author

Hey @magento-team, I do not understand how it works for bugfix to go in the release. It is written that it has been merged on March 5th. What is the status on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: ImportExport Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

5 participants