Skip to content

Commit dd73e99

Browse files
author
hwyu@adobe.com
committed
MC-36035: Prevent input based resource allocation
1 parent be28086 commit dd73e99

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
use Magento\Framework\Api\AttributeValue;
1313
use Magento\Framework\Api\AttributeValueFactory;
14+
use Magento\Framework\Api\SearchCriteriaInterface;
1415
use Magento\Framework\Api\SimpleDataObjectConverter;
1516
use Magento\Framework\App\ObjectManager;
1617
use Magento\Framework\Exception\InputException;
@@ -299,6 +300,13 @@ protected function _createFromArray($className, $data)
299300
$object->{$setterName}($setterValue);
300301
}
301302
}
303+
304+
if ($object instanceof SearchCriteriaInterface
305+
&& $object->getPageSize() === null
306+
) {
307+
$object->setPageSize(20);
308+
}
309+
302310
return $object;
303311
}
304312

0 commit comments

Comments
 (0)