Skip to content

Commit e40223c

Browse files
author
Dale Sikkema
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-45159-insecure-admin-cookie
2 parents 63f7e51 + 7b34fe2 commit e40223c

File tree

67 files changed

+1280
-647
lines changed

Some content is hidden

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

67 files changed

+1280
-647
lines changed

app/code/Magento/Backend/view/adminhtml/layout/default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
99
<head>
1010
<title>Magento Admin</title>
11-
<meta name="viewport" content="width=device-width"/>
11+
<meta name="viewport" content="width=1024, initial-scale=1"/>
1212
<link src="requirejs/require.js"/>
1313
<css src="extjs/resources/css/ext-all.css"/>
1414
<css src="extjs/resources/css/ytheme-magento.css"/>

app/code/Magento/Braintree/Model/Checkout.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ private function ignoreAddressValidation()
119119
*/
120120
protected function importAddressData($address, $exportedAddress)
121121
{
122-
$address->setStreet([$exportedAddress['streetAddress'], $exportedAddress['extendedAddress']]);
122+
$extendedAddress = isset($exportedAddress['extendedAddress']) ? $exportedAddress['extendedAddress'] : null;
123+
$address->setStreet([$exportedAddress['streetAddress'], $extendedAddress]);
123124
$address->setCity($exportedAddress['locality']);
124125
$address->setRegionCode($exportedAddress['region']);
125126
$address->setCountryId($exportedAddress['countryCodeAlpha2']);

app/code/Magento/Braintree/Test/Unit/Model/CheckoutTest.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ public function testInitializeQuoteForReview(
214214
$this->model->initializeQuoteForReview($paymentMethodNonce, $details);
215215
}
216216

217+
/**
218+
* @return array
219+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
220+
*/
217221
public function initializeQuoteForReviewDataProvider()
218222
{
219223
return [
@@ -311,6 +315,48 @@ public function initializeQuoteForReviewDataProvider()
311315
'payerLastName' => self::LASTNAME,
312316
]
313317
],
318+
'without_shipping_extended_address' => [
319+
'payment_method_nonce' => 'nonce',
320+
'details' => [
321+
'email' => self::EMAIL,
322+
'firstName' => self::FIRSTNAME,
323+
'lastName' => self::LASTNAME,
324+
'shippingAddress' => [
325+
'streetAddress' => self::SHIPPING_STREET_ADDRESS,
326+
'locality' => self::SHIPPING_LOCALITY,
327+
'region' => self::SHIPPING_REGION,
328+
'countryCodeAlpha2' => self::SHIPPING_COUNTRY_CODE,
329+
'postalCode' => self::SHIPPING_POSTAL_CODE,
330+
],
331+
],
332+
'expected_shipping' => [
333+
'setFirstname' => self::FIRSTNAME,
334+
'setLastname' => self::LASTNAME,
335+
'setEmail' => self::EMAIL,
336+
'setCollectShippingRates' => true,
337+
'setStreet' => [self::SHIPPING_STREET_ADDRESS, null],
338+
'setCity' => self::SHIPPING_LOCALITY,
339+
'setRegionCode' => self::SHIPPING_REGION,
340+
'setCountryId' => self::SHIPPING_COUNTRY_CODE,
341+
'setPostCode' => self::SHIPPING_POSTAL_CODE,
342+
],
343+
'expected_billing' => [
344+
'setFirstname' => self::FIRSTNAME,
345+
'setLastname' => self::LASTNAME,
346+
'setEmail' => self::EMAIL,
347+
'setStreet' => [self::SHIPPING_STREET_ADDRESS, null],
348+
'setCity' => self::SHIPPING_LOCALITY,
349+
'setRegionCode' => self::SHIPPING_REGION,
350+
'setCountryId' => self::SHIPPING_COUNTRY_CODE,
351+
'setPostCode' => self::SHIPPING_POSTAL_CODE,
352+
],
353+
'expected_payment_additional_info' => [
354+
'payment_method_nonce' => 'nonce',
355+
'payerEmail' => self::EMAIL,
356+
'payerFirstName' => self::FIRSTNAME,
357+
'payerLastName' => self::LASTNAME,
358+
]
359+
],
314360
];
315361
}
316362
}

0 commit comments

Comments
 (0)