Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.3-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - #12961: [Backport to 2.3-develop] Fixed double space typo (by @dverkade)
 - #12872: Fix import from external jpeg images (by @PieterCappelle)


Fixed GitHub Issues:
 - #5306: Images imported via URL have crazy file paths (reported by @hgpit) has been fixed in #12872 by @PieterCappelle in 2.3-develop branch
   Related commits:
     1. 8cdf043
     2. 53292d3

 - #12455: Import uploader does not check Content-Disposition header  (reported by @EliasZ) has been fixed in #12872 by @PieterCappelle in 2.3-develop branch
   Related commits:
     1. 8cdf043
     2. 53292d3

 - #12533: Unable to import external jpeg images from a CDN with dynamic URLs. (reported by @dromoded) has been fixed in #12872 by @PieterCappelle in 2.3-develop branch
   Related commits:
     1. 8cdf043
     2. 53292d3
  • Loading branch information
magento-team authored Jan 3, 2018
2 parents ccf68bb + 6ad1d01 commit 5dc38df
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ public function move($fileName, $renameFileOff = false)
$read = $this->_readFactory->create($url, DriverPool::HTTPS);
}

//only use filename (for URI with query parameters)
$parsedUrlPath = parse_url($url, PHP_URL_PATH);
if ($parsedUrlPath) {
$urlPathValues = explode('/', $parsedUrlPath);
if (!empty($urlPathValues)) {
$fileName = end($urlPathValues);
}
}

$fileName = preg_replace('/[^a-z0-9\._-]+/i', '', $fileName);
$this->_directory->writeFile(
$this->_directory->getRelativePath($this->getTmpDir() . '/' . $fileName),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,32 @@ public function moveFileUrlDataProvider()
[
'$fileUrl' => 'http://test_uploader_file',
'$expectedHost' => 'test_uploader_file',
'$expectedFileName' => 'httptest_uploader_file',
'$expectedFileName' => 'test_uploader_file',
],
[
'$fileUrl' => 'https://!:^&`;file',
'$expectedHost' => '!:^&`;file',
'$expectedFileName' => 'httpsfile',
'$expectedFileName' => 'file',
],
[
'$fileUrl' => 'https://www.google.com/image.jpg',
'$expectedHost' => 'www.google.com/image.jpg',
'$expectedFileName' => 'image.jpg',
],
[
'$fileUrl' => 'https://www.google.com/image.jpg?param=1',
'$expectedHost' => 'www.google.com/image.jpg?param=1',
'$expectedFileName' => 'image.jpg',
],
[
'$fileUrl' => 'https://www.google.com/image.jpg?param=1&param=2',
'$expectedHost' => 'www.google.com/image.jpg?param=1&param=2',
'$expectedFileName' => 'image.jpg',
],
[
'$fileUrl' => 'http://www.google.com/image.jpg?param=1&param=2',
'$expectedHost' => 'www.google.com/image.jpg?param=1&param=2',
'$expectedFileName' => 'image.jpg',
],
];
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Paypal/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ expires,expires
here,here
" to learn more."," to learn more."
"Important: ","Important: "
"To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website.","To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website."
"To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website.","To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website."
"Once you log into your PayPal Advanced account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below","Once you log into your PayPal Advanced account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below"
"To use PayPal Payflow Link, you must configure your PayPal Payflow Link account on the PayPal website.","To use PayPal Payflow Link, you must configure your PayPal Payflow Link account on the PayPal website."
"Once you log into your PayPal Payflow Link account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below","Once you log into your PayPal Payflow Link account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="payflow-settings-notice">
<p>
<strong class="important-label"><?= $block->escapeHtml(__('Important: ')) ?></strong>
<?= $block->escapeHtml(__('To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website.')) ?>
<?= $block->escapeHtml(__('To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website.')) ?>
<?= $block->escapeHtml(__('Once you log into your PayPal Advanced account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below')) ?>
</p>
<ul class="options-list">
Expand Down

0 comments on commit 5dc38df

Please sign in to comment.