Skip to content

Commit 2a3e707

Browse files
committed
Merge branch 'develop_mainline' into MAGETWO-43510-x-frame
2 parents 7e5f6ff + c743dec commit 2a3e707

File tree

2,727 files changed

+34813
-16879
lines changed

Some content is hidden

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

2,727 files changed

+34813
-16879
lines changed

.htaccess

+33
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,32 @@
5858

5959
</IfModule>
6060

61+
<IfModule mod_php7.c>
62+
63+
############################################
64+
## adjust memory limit
65+
66+
php_value memory_limit 768M
67+
php_value max_execution_time 18000
68+
69+
############################################
70+
## disable automatic session start
71+
## before autoload was initialized
72+
73+
php_flag session.auto_start off
74+
75+
############################################
76+
## enable resulting html compression
77+
78+
#php_flag zlib.output_compression on
79+
80+
###########################################
81+
## disable user agent verification to not break multiple image upload
82+
83+
php_flag suhosin.session.cryptua off
84+
85+
</IfModule>
86+
6187
<IfModule mod_security.c>
6288
###########################################
6389
## disable POST processing to not break multiple image upload
@@ -103,6 +129,13 @@
103129

104130
</IfModule>
105131

132+
############################################
133+
## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other)
134+
## Please, set it on virtual host configuration level
135+
136+
## SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
137+
############################################
138+
106139
<IfModule mod_rewrite.c>
107140

108141
############################################

app/bootstrap.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,15 @@
3131
require_once __DIR__ . '/autoload.php';
3232
require_once BP . '/app/functions.php';
3333

34-
if (!empty($_SERVER['MAGE_PROFILER'])) {
35-
\Magento\Framework\Profiler::applyConfig($_SERVER['MAGE_PROFILER'], BP, !empty($_REQUEST['isAjax']));
34+
if (!empty($_SERVER['MAGE_PROFILER'])
35+
&& isset($_SERVER['HTTP_ACCEPT'])
36+
&& strpos($_SERVER['HTTP_ACCEPT'], 'text/html') !== false
37+
) {
38+
\Magento\Framework\Profiler::applyConfig(
39+
$_SERVER['MAGE_PROFILER'],
40+
BP,
41+
!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'
42+
);
3643
}
3744
if (ini_get('date.timezone') == '') {
3845
date_default_timezone_set('UTC');

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/AjaxMarkAsRead.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class AjaxMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Not
1313
*
1414
* @return void
1515
*/
16-
public function execute()
16+
public function executeInternal()
1717
{
1818
if (!$this->getRequest()->getPostValue()) {
1919
return;

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/Index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Index extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1111
/**
1212
* @return void
1313
*/
14-
public function execute()
14+
public function executeInternal()
1515
{
1616
$this->_view->loadLayout();
1717
$this->_setActiveMenu(

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MarkAsRead.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Notific
1111
/**
1212
* @return void
1313
*/
14-
public function execute()
14+
public function executeInternal()
1515
{
1616
$notificationId = (int)$this->getRequest()->getParam('id');
1717
if ($notificationId) {

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MassMarkAsRead.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MassMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Not
1111
/**
1212
* @return void
1313
*/
14-
public function execute()
14+
public function executeInternal()
1515
{
1616
$ids = $this->getRequest()->getParam('notification');
1717
if (!is_array($ids)) {

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MassRemove.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MassRemove extends \Magento\AdminNotification\Controller\Adminhtml\Notific
1111
/**
1212
* @return void
1313
*/
14-
public function execute()
14+
public function executeInternal()
1515
{
1616
$ids = $this->getRequest()->getParam('notification');
1717
if (!is_array($ids)) {

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/Remove.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Remove extends \Magento\AdminNotification\Controller\Adminhtml\Notificatio
1111
/**
1212
* @return void
1313
*/
14-
public function execute()
14+
public function executeInternal()
1515
{
1616
if ($id = $this->getRequest()->getParam('id')) {
1717
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')->load($id);

app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(
3838
/**
3939
* @return void
4040
*/
41-
public function execute()
41+
public function executeInternal()
4242
{
4343
$severity = $this->getRequest()->getParam('severity');
4444
if ($severity) {

app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/Media/Synchronization/SuccessTest.php

-101
This file was deleted.

app/code/Magento/AdvancedPricingImportExport/Controller/Adminhtml/Export/GetFilter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class GetFilter extends ExportController
1717
*
1818
* @return \Magento\Framework\Controller\ResultInterface
1919
*/
20-
public function execute()
20+
public function executeInternal()
2121
{
2222
$data = $this->getRequest()->getParams();
2323
if ($this->getRequest()->isXmlHttpRequest() && $data) {

app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/Place.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(
5151
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
5252
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
5353
*/
54-
public function execute()
54+
public function executeInternal()
5555
{
5656
$paymentParam = $this->getRequest()->getParam('payment');
5757
$controller = $this->getRequest()->getParam('controller');

app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/Redirect.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function _returnQuote($cancelOrder, $errorMsg)
9090
*
9191
* @return \Magento\Framework\View\Result\Layout
9292
*/
93-
public function execute()
93+
public function executeInternal()
9494
{
9595
$redirectParams = $this->getRequest()->getParams();
9696
$params = [];

app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/ReturnQuote.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function _returnQuote()
3131
*
3232
* @return void
3333
*/
34-
public function execute()
34+
public function executeInternal()
3535
{
3636
$this->_returnQuote();
3737
$this->getResponse()->representJson(

app/code/Magento/Authorizenet/Controller/Directpost/Payment.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ protected function _returnCustomerQuote($cancelOrder = false, $errorMsg = '')
130130
$order = $this->_objectManager->create('Magento\Sales\Model\Order')->loadByIncrementId($incrementId);
131131
if ($order->getId()) {
132132
try {
133-
/** @var \Magento\Quote\Model\QuoteRepository $quoteRepository */
134-
$quoteRepository = $this->_objectManager->create('Magento\Quote\Model\QuoteRepository');
133+
/** @var \Magento\Quote\Api\CartRepositoryInterface $quoteRepository */
134+
$quoteRepository = $this->_objectManager->create('Magento\Quote\Api\CartRepositoryInterface');
135135
/** @var \Magento\Quote\Model\Quote $quote */
136136
$quote = $quoteRepository->get($order->getQuoteId());
137137

app/code/Magento/Authorizenet/Controller/Directpost/Payment/BackendResponse.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class BackendResponse extends \Magento\Authorizenet\Controller\Directpost\Paymen
1414
*
1515
* @return void
1616
*/
17-
public function execute()
17+
public function executeInternal()
1818
{
1919
$this->_responseAction('adminhtml');
2020
}

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct(
7171
*
7272
* @return string
7373
*/
74-
public function execute()
74+
public function executeInternal()
7575
{
7676
$paymentParam = $this->getRequest()->getParam('payment');
7777
$controller = $this->getRequest()->getParam('controller');

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Redirect.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Redirect extends \Magento\Authorizenet\Controller\Directpost\Payment
1515
*
1616
* @return void
1717
*/
18-
public function execute()
18+
public function executeInternal()
1919
{
2020
$helper = $this->dataFactory->create('frontend');
2121

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Response.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Response extends \Magento\Authorizenet\Controller\Directpost\Payment
1414
*
1515
* @return void
1616
*/
17-
public function execute()
17+
public function executeInternal()
1818
{
1919
$this->_responseAction('frontend');
2020
}

app/code/Magento/Authorizenet/Controller/Directpost/Payment/ReturnQuote.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ReturnQuote extends \Magento\Authorizenet\Controller\Directpost\Payment
1313
*
1414
* @return void
1515
*/
16-
public function execute()
16+
public function executeInternal()
1717
{
1818
$this->_returnCustomerQuote();
1919
$this->getResponse()->representJson(

app/code/Magento/Authorizenet/Model/Authorizenet.php

+11-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\Authorizenet\Model;
77

88
use Magento\Authorizenet\Model\TransactionService;
9+
use Magento\Framework\HTTP\ZendClientFactory;
910

1011
/**
1112
* @SuppressWarnings(PHPMD.TooManyFields)
@@ -97,6 +98,11 @@ abstract class Authorizenet extends \Magento\Payment\Model\Method\Cc
9798
*/
9899
protected $_debugReplacePrivateDataKeys = ['merchantAuthentication', 'x_login'];
99100

101+
/**
102+
* @var \Magento\Framework\HTTP\ZendClientFactory
103+
*/
104+
protected $httpClientFactory;
105+
100106
/**
101107
* @param \Magento\Framework\Model\Context $context
102108
* @param \Magento\Framework\Registry $registry
@@ -111,6 +117,7 @@ abstract class Authorizenet extends \Magento\Payment\Model\Method\Cc
111117
* @param \Magento\Authorizenet\Model\Request\Factory $requestFactory
112118
* @param \Magento\Authorizenet\Model\Response\Factory $responseFactory
113119
* @param \Magento\Authorizenet\Model\TransactionService $transactionService
120+
* @param \Magento\Framework\HTTP\ZendClientFactory $httpClientFactory
114121
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
115122
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
116123
* @param array $data
@@ -130,6 +137,7 @@ public function __construct(
130137
\Magento\Authorizenet\Model\Request\Factory $requestFactory,
131138
\Magento\Authorizenet\Model\Response\Factory $responseFactory,
132139
TransactionService $transactionService,
140+
ZendClientFactory $httpClientFactory,
133141
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
134142
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
135143
array $data = []
@@ -138,6 +146,7 @@ public function __construct(
138146
$this->requestFactory = $requestFactory;
139147
$this->responseFactory = $responseFactory;
140148
$this->transactionService = $transactionService;
149+
$this->httpClientFactory = $httpClientFactory;
141150

142151
parent::__construct(
143152
$context,
@@ -370,7 +379,8 @@ protected function buildRequest(\Magento\Framework\DataObject $payment)
370379
protected function postRequest(\Magento\Authorizenet\Model\Request $request)
371380
{
372381
$result = $this->responseFactory->create();
373-
$client = new \Magento\Framework\HTTP\ZendClient();
382+
/** @var \Magento\Framework\HTTP\ZendClient $client */
383+
$client = $this->httpClientFactory->create();
374384
$url = $this->getConfigData('cgi_url') ?: self::CGI_URL;
375385
$debugData = ['url' => $url, 'request' => $request->getData()];
376386
$client->setUri($url);

0 commit comments

Comments
 (0)