Skip to content

Commit 7a79bd8

Browse files
author
magento packaging service
committed
Version 2.1.2-p3
1 parent d539a70 commit 7a79bd8

File tree

43 files changed

+459
-98
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+459
-98
lines changed

AdobeStockAdminUi/composer.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
{
22
"name": "magento/module-adobe-stock-admin-ui",
33
"description": "Magento module responsible for the admin panel UI implementation",
4+
"type": "magento2-module",
5+
"license": [
6+
"OSL-3.0",
7+
"AFL-3.0"
8+
],
9+
"version": "1.3.0-p2",
410
"require": {
511
"php": "~7.3.0||~7.4.0",
612
"magento/framework": "*",
713
"magento/module-adobe-ims-api": "*",
8-
"magento/module-adobe-stock-client-api": "*",
14+
"magento/module-adobe-stock-client-api": "2.1.*",
915
"magento/module-backend": "*",
1016
"magento/module-config": "*"
1117
},
1218
"suggest": {
1319
"magento/module-cms": "*"
1420
},
15-
"type": "magento2-module",
16-
"license": [
17-
"OSL-3.0",
18-
"AFL-3.0"
19-
],
2021
"autoload": {
2122
"files": [
2223
"registration.php"
@@ -26,3 +27,4 @@
2627
}
2728
}
2829
}
30+

AdobeStockAsset/composer.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
{
22
"name": "magento/module-adobe-stock-asset",
33
"description": "Magento module responsible for the Adobe Stock assets handling implementation on Magento side",
4+
"type": "magento2-module",
5+
"license": [
6+
"OSL-3.0",
7+
"AFL-3.0"
8+
],
9+
"version": "1.3.0-p2",
410
"require": {
511
"php": "~7.3.0||~7.4.0",
612
"magento/framework": "*",
7-
"magento/module-adobe-stock-asset-api": "*",
8-
"magento/module-adobe-stock-client-api": "*",
13+
"magento/module-adobe-stock-asset-api": "2.0.*",
14+
"magento/module-adobe-stock-client-api": "2.1.*",
915
"magento/module-media-gallery-api": "*",
1016
"magento/module-media-gallery": "*",
1117
"magento/module-config": "*"
1218
},
13-
"type": "magento2-module",
14-
"license": [
15-
"OSL-3.0",
16-
"AFL-3.0"
17-
],
1819
"autoload": {
1920
"files": [
2021
"registration.php"
@@ -30,3 +31,4 @@
3031
}
3132
}
3233
}
34+

AdobeStockAssetApi/composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"name": "magento/module-adobe-stock-asset-api",
33
"description": "Magento module responsible for Adobe Stock assets handling on Magento side",
4-
"require": {
5-
"php": "~7.3.0||~7.4.0",
6-
"magento/framework": "*"
7-
},
84
"type": "magento2-module",
95
"license": [
106
"OSL-3.0",
117
"AFL-3.0"
128
],
9+
"version": "2.0.0-p2",
10+
"require": {
11+
"php": "~7.3.0||~7.4.0",
12+
"magento/framework": "*"
13+
},
1314
"autoload": {
1415
"files": [
1516
"registration.php"
@@ -19,3 +20,4 @@
1920
}
2021
}
2122
}
23+

AdobeStockClient/composer.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
22
"name": "magento/module-adobe-stock-client",
33
"description": "Magento module responsible for interaction with Adobe Stock API implementation",
4+
"type": "magento2-module",
5+
"license": [
6+
"OSL-3.0",
7+
"AFL-3.0"
8+
],
9+
"version": "1.3.1-p2",
410
"require": {
511
"php": "~7.3.0||~7.4.0",
612
"magento/framework": "*",
713
"magento/module-adobe-ims-api": "*",
8-
"magento/module-adobe-stock-client-api": "*",
14+
"magento/module-adobe-stock-client-api": "2.1.*",
915
"astock/stock-api-libphp": "^1.1.2"
1016
},
11-
"type": "magento2-module",
12-
"license": [
13-
"OSL-3.0",
14-
"AFL-3.0"
15-
],
1617
"autoload": {
1718
"files": [
1819
"registration.php"
@@ -28,3 +29,4 @@
2829
}
2930
}
3031
}
32+

AdobeStockClientApi/composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"name": "magento/module-adobe-stock-client-api",
33
"description": "Magento module responsible for interaction with Adobe Stock API",
4-
"require": {
5-
"php": "~7.3.0||~7.4.0",
6-
"magento/framework": "*"
7-
},
84
"type": "magento2-module",
95
"license": [
106
"OSL-3.0",
117
"AFL-3.0"
128
],
9+
"version": "2.1.0-p2",
10+
"require": {
11+
"php": "~7.3.0||~7.4.0",
12+
"magento/framework": "*"
13+
},
1314
"autoload": {
1415
"files": [
1516
"registration.php"
@@ -19,3 +20,4 @@
1920
}
2021
}
2122
}
23+

AdobeStockImage/Model/Storage/Save.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,24 @@ class Save
3939
*/
4040
private $isPathExcluded;
4141

42+
/**
43+
* @var int|null
44+
*/
45+
private $maxFileLength;
46+
4247
/**
4348
* @param Filesystem $filesystem
4449
* @param Https $driver
4550
* @param IsPathExcludedInterface $isPathExcluded
51+
* @param int|null $maxFileLength
4652
*/
4753
public function __construct(
4854
Filesystem $filesystem,
4955
Https $driver,
50-
IsPathExcludedInterface $isPathExcluded
56+
IsPathExcludedInterface $isPathExcluded,
57+
int $maxFileLength = null
5158
) {
59+
$this->maxFileLength = $maxFileLength ?: 255;
5260
$this->filesystem = $filesystem;
5361
$this->driver = $driver;
5462
$this->isPathExcluded = $isPathExcluded;
@@ -66,6 +74,12 @@ public function __construct(
6674
*/
6775
public function execute(string $imageUrl, string $destinationPath, bool $allowOverwrite = false): void
6876
{
77+
if (strlen($destinationPath) > $this->maxFileLength) {
78+
throw new LocalizedException(
79+
__('Destination path is too long; must be %1 characters or less', $this->maxFileLength)
80+
);
81+
}
82+
6983
$mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA);
7084

7185
if ($this->isPathExcluded->execute($destinationPath)) {

AdobeStockImage/Test/Mftf/Test/StorefrontAdobeStockIntegrationApiSwaggerActionsExistTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1051731/scenarios/4297030"/>
1616
<description value="Adobe stock actions are available on the Swagger page"/>
1717
<severity value="CRITICAL"/>
18+
<group value="developer_mode_only"/>
1819
</annotations>
1920
<before>
2021
<getOTP stepKey="getOtpCode"/>

AdobeStockImage/Test/Unit/Model/Storage/SaveTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\AdobeStockImage\Model\Storage\Save;
1111
use Magento\Framework\App\Filesystem\DirectoryList;
1212
use Magento\Framework\Exception\AlreadyExistsException;
13+
use Magento\Framework\Exception\LocalizedException;
1314
use Magento\Framework\Filesystem;
1415
use Magento\Framework\Filesystem\Directory\Write;
1516
use Magento\Framework\Filesystem\Driver\Https;
@@ -123,4 +124,18 @@ public function testExceptionOnSaveExecution(): void
123124

124125
$this->save->execute($imageUrl, '/240_F_272299924_HjNOJkyyhzFVKRcSQ2TaArR7Ka6nTXRa.jpg');
125126
}
127+
128+
/**
129+
* Assume that execute will thrown an Exception for mexFileLength (default: 255 chars)
130+
*/
131+
public function testExceptionOnMaxFileLength(): void
132+
{
133+
$imageUrl = 'https://t4.ftcdn.net/jpg/02/72/29/99/240_F_272299924_HjNOJkyyhzFVKRcSQ2TaArR7Ka6nTXRa.jpg';
134+
135+
$destinationPath = '/test-destination-path/this_destination_path_has_more_than_255_chars_to_check_exception_//jpg/02/72/29/99//jpg/02/72/29/99//jpg/02/72/29/99//240_F_272299924_HjNOJkyyhzFVKRcSQ2TaArR7Ka6nTXRa_HjNOJkyyhzFVKRcSQ2TaArR7Ka6nTXRa_HjNOJkyyhzFVKRcSQ2TaArR7Ka6nTXRa.jpg';
136+
137+
$this->expectException(LocalizedException::class);
138+
139+
$this->save->execute($imageUrl, $destinationPath);
140+
}
126141
}

AdobeStockImage/composer.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
{
22
"name": "magento/module-adobe-stock-image",
33
"description": "Magento module responsible for the images handling implementation",
4+
"type": "magento2-module",
5+
"license": [
6+
"OSL-3.0",
7+
"AFL-3.0"
8+
],
9+
"version": "1.3.1-p2",
410
"require": {
511
"php": "~7.3.0||~7.4.0",
612
"magento/framework": "*",
7-
"magento/module-adobe-stock-client-api": "*",
8-
"magento/module-adobe-stock-asset-api": "*",
9-
"magento/module-adobe-stock-image-api": "*",
13+
"magento/module-adobe-stock-client-api": "2.1.*",
14+
"magento/module-adobe-stock-asset-api": "2.0.*",
15+
"magento/module-adobe-stock-image-api": "1.3.*",
1016
"magento/module-media-gallery-api": "*",
1117
"magento/module-media-gallery-synchronization-api": "*"
1218
},
1319
"suggest": {
1420
"magento/module-catalog": "*"
1521
},
16-
"type": "magento2-module",
17-
"license": [
18-
"OSL-3.0",
19-
"AFL-3.0"
20-
],
2122
"autoload": {
2223
"files": [
2324
"registration.php"
@@ -27,3 +28,4 @@
2728
}
2829
}
2930
}
31+

AdobeStockImage/etc/di.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<type name="Magento\AdobeStockImage\Model\Storage\Save">
3737
<arguments>
3838
<argument name="driver" xsi:type="object">Magento\Framework\Filesystem\Driver\Https</argument>
39+
<argument name="maxFileLength" xsi:type="number">255</argument>
3940
</arguments>
4041
</type>
4142
<type name="Magento\AdobeStockImage\Model\GetRelatedImages">

0 commit comments

Comments
 (0)