Skip to content

Commit ef947f0

Browse files
committed
Merge remote-tracking branch 'origin/mtf-eol' into MC-4332
2 parents ff4ca40 + 0aea1de commit ef947f0

File tree

2,406 files changed

+137509
-31228
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,406 files changed

+137509
-31228
lines changed

.github/CONTRIBUTING.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# Contributing to Magento 2 code
22

33
Contributions to the Magento 2 codebase are done using the fork & pull model.
4-
This contribution model has contributors maintaining their own copy of the forked codebase (which can easily be synced with the main copy). The forked repository is then used to submit a request to the base repository to “pull” a set of changes. For more information on pull requests please refer to [GitHub Help](https://help.github.com/articles/about-pull-requests/).
4+
This contribution model has contributors maintaining their own fork of the Magento 2 repository.
5+
The forked repository is then used to submit a request to the base repository to “pull” a set of changes.
6+
For more information on pull requests please refer to [GitHub Help](https://help.github.com/articles/about-pull-requests/).
57

68
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes or optimizations.
79

8-
The Magento 2 development team will review all issues and contributions submitted by the community of developers in the first in, first out order. During the review we might require clarifications from the contributor. If there is no response from the contributor within two weeks, the pull request will be closed.
10+
The Magento 2 development team or community maintainers will review all issues and contributions submitted by the community of developers in the first in, first out order.
11+
During the review we might require clarifications from the contributor.
12+
If there is no response from the contributor within two weeks, the pull request will be closed.
913

14+
For more detailed information on contribution please read our [beginners guide](https://github.com/magento/magento2/wiki/Getting-Started).
1015

1116
## Contribution requirements
1217

13-
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.2/coding-standards/bk-coding-standards.html).
18+
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.3/coding-standards/bk-coding-standards.html).
1419
2. Pull requests (PRs) must be accompanied by a meaningful description of their purpose. Comprehensive descriptions increase the chances of a pull request being merged quickly and without additional clarification requests.
15-
3. Commits must be accompanied by meaningful commit messages. Please see the [Magento Pull Request Template](https://github.com/magento/magento2/blob/2.2-develop/.github/PULL_REQUEST_TEMPLATE.md) for more information.
20+
3. Commits must be accompanied by meaningful commit messages. Please see the [Magento Pull Request Template](https://github.com/magento/magento2/blob/2.3-develop/.github/PULL_REQUEST_TEMPLATE.md) for more information.
1621
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.
1722
3. PRs which include new logic or new features must be submitted along with:
1823
* Unit/integration test coverage
@@ -22,15 +27,22 @@ The Magento 2 development team will review all issues and contributions submitte
2227

2328
## Contribution process
2429

25-
If you are a new GitHub user, we recommend that you create your own [free github account](https://github.com/signup/free). This will allow you to collaborate with the Magento 2 development team, fork the Magento 2 project and send pull requests.
30+
If you are a new GitHub user, we recommend that you create your own [free github account](https://github.com/signup/free).
31+
This will allow you to collaborate with the Magento 2 development team, fork the Magento 2 project and send pull requests.
2632

2733
1. Search current [listed issues](https://github.com/magento/magento2/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution.
2834
2. Review the [Contributor License Agreement](https://magento.com/legaldocuments/mca) if this is your first time contributing.
2935
3. Create and test your work.
30-
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#pull_request).
36+
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#pull_request).
3137
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.
3238

3339
## Code of Conduct
3440

3541
Please note that this project is released with a Contributor Code of Conduct. We expect you to agree to its terms when participating in this project.
3642
The full text is available in the repository [Wiki](https://github.com/magento/magento2/wiki/Magento-Code-of-Conduct).
43+
44+
## Connecting with Community!
45+
46+
If you have any questions, join us in [#beginners](https://magentocommeng.slack.com/messages/CH8BGFX9D) Slack chat. If you are not on our slack, [click here](http://tinyurl.com/engcom-slack) to join.
47+
48+
Need to find a project? Check out the [Slack Channels](https://github.com/magento/magento2/wiki/Slack-Channels) (with listed project info) and the [Magento Community Portal](https://opensource.magento.com/).

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
2222
-->
2323
1. magento/magento2#<issue_number>: Issue title
24-
2. ...
2524

2625
### Manual testing scenarios (*)
2726
<!---
@@ -31,8 +30,14 @@
3130
1. ...
3231
2. ...
3332

33+
### Questions or comments
34+
<!---
35+
If relevant, here you can ask questions or provide comments on your pull request for the reviewer
36+
For example if you need assistance with writing tests or would like some feedback on one of your development ideas
37+
-->
38+
3439
### Contribution checklist (*)
3540
- [ ] Pull request has a meaningful description of its purpose
3641
- [ ] All commits are accompanied by meaningful commit messages
3742
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
38-
- [ ] All automated tests passed successfully (all builds on Travis CI are green)
43+
- [ ] All automated tests passed successfully (all builds are green)
File renamed without changes.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
[![Build Status](https://travis-ci.org/magento/magento2.svg?branch=2.3-develop)](https://travis-ci.org/magento/magento2)
21
[![Open Source Helpers](https://www.codetriage.com/magento/magento2/badges/users.svg)](https://www.codetriage.com/magento/magento2)
32
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/magento/magento2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
43
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/magento-2/localized.svg)](https://crowdin.com/project/magento-2)

SECURITY.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Reporting Security Issues
2+
3+
Magento values the contributions of the security research community, and we look forward to working with you to minimize risk to Magento merchants.
4+
5+
## Where should I report security issues?
6+
7+
We strongly encourage you to report all security issues privately via our [bug bounty program](https://hackerone.com/magento). Please provide us with relevant technical details and repro steps to expedite our investigation. If you prefer not to use HackerOne, email us directly at `psirt@adobe.com` with details and repro steps.
8+
9+
## Learning More About Security
10+
To learn more about securing a Magento store, please visit the [Security Center](https://magento.com/security).

app/code/Magento/AdminNotification/Model/Feed.php

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\AdminNotification\Model;
77

8+
use Magento\Framework\Escaper;
9+
use Magento\Framework\App\ObjectManager;
810
use Magento\Framework\Config\ConfigOptionsListConstants;
911

1012
/**
@@ -25,6 +27,11 @@ class Feed extends \Magento\Framework\Model\AbstractModel
2527

2628
const XML_LAST_UPDATE_PATH = 'system/adminnotification/last_update';
2729

30+
/**
31+
* @var Escaper
32+
*/
33+
private $escaper;
34+
2835
/**
2936
* Feed url
3037
*
@@ -77,6 +84,7 @@ class Feed extends \Magento\Framework\Model\AbstractModel
7784
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
7885
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
7986
* @param array $data
87+
* @param Escaper|null $escaper
8088
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
8189
*/
8290
public function __construct(
@@ -90,21 +98,26 @@ public function __construct(
9098
\Magento\Framework\UrlInterface $urlBuilder,
9199
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
92100
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
93-
array $data = []
101+
array $data = [],
102+
Escaper $escaper = null
94103
) {
95104
parent::__construct($context, $registry, $resource, $resourceCollection, $data);
96-
$this->_backendConfig = $backendConfig;
97-
$this->_inboxFactory = $inboxFactory;
98-
$this->curlFactory = $curlFactory;
105+
$this->_backendConfig = $backendConfig;
106+
$this->_inboxFactory = $inboxFactory;
107+
$this->curlFactory = $curlFactory;
99108
$this->_deploymentConfig = $deploymentConfig;
100-
$this->productMetadata = $productMetadata;
101-
$this->urlBuilder = $urlBuilder;
109+
$this->productMetadata = $productMetadata;
110+
$this->urlBuilder = $urlBuilder;
111+
$this->escaper = $escaper ?? ObjectManager::getInstance()->get(
112+
Escaper::class
113+
);
102114
}
103115

104116
/**
105117
* Init model
106118
*
107119
* @return void
120+
* phpcs:disable Magento2.CodeAnalysis.EmptyBlock
108121
*/
109122
protected function _construct()
110123
{
@@ -252,6 +265,6 @@ public function getFeedXml()
252265
*/
253266
private function escapeString(\SimpleXMLElement $data)
254267
{
255-
return htmlspecialchars((string)$data);
268+
return $this->escaper->escapeHtml((string)$data);
256269
}
257270
}

app/code/Magento/AdminNotification/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"magento/module-backend": "*",
1212
"magento/module-media-storage": "*",
1313
"magento/module-store": "*",
14-
"magento/module-ui": "*"
14+
"magento/module-ui": "*",
15+
"magento/module-config": "*"
1516
},
1617
"type": "magento2-module",
1718
"license": [

app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
9-
?>
10-
<?php
117
/**
128
* @see \Magento\AdminNotification\Block\Window
139
*/
@@ -19,11 +15,13 @@
1915
"autoOpen": true,
2016
"buttons": false,
2117
"modalClass": "modal-system-messages",
22-
"title": "<?= /* @escapeNotVerified */ $block->getHeaderText() ?>"
18+
"title": "<?= $block->escapeHtmlAttr($block->getHeaderText()) ?>"
2319
}
2420
}'>
2521
<li class="message message-warning warning">
26-
<?= /* @escapeNotVerified */ $block->getNoticeMessageText() ?><br/>
27-
<a href="<?= /* @escapeNotVerified */ $block->getNoticeMessageUrl() ?>"><?= /* @escapeNotVerified */ $block->getReadDetailsText() ?></a>
22+
<?= $block->escapeHtml($block->getNoticeMessageText()) ?><br/>
23+
<a href="<?= $block->escapeUrl($block->getNoticeMessageUrl()) ?>">
24+
<?= $block->escapeHtml($block->getReadDetailsText()) ?>
25+
</a>
2826
</li>
2927
</ul>

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,41 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
7+
/** @var $block \Magento\AdminNotification\Block\System\Messages */
98
?>
10-
<?php /** @var $block \Magento\AdminNotification\Block\System\Messages */ ?>
119

1210
<?php $lastCritical = $block->getLastCritical();?>
13-
<div id="system_messages" class="message-system<?php if ($lastCritical): ?> message-system-unread<?php endif; ?>">
11+
<div id="system_messages"
12+
class="message-system<?php if ($lastCritical) : ?>
13+
message-system-unread<?php endif; ?>">
1414
<div class="message-system-inner">
15-
<?php if ($lastCritical): ?>
15+
<?php if ($lastCritical) : ?>
1616
<ul class="message-system-list">
1717
<li class="message message-warning error">
18-
<?= /* @escapeNotVerified */ $lastCritical->getText() ?>
18+
<?= $block->escapeHtml($lastCritical->getText()) ?>
1919
</li>
2020
</ul>
2121
<?php endif; ?>
2222
<div class="message-system-short">
2323
<span class="message-system-short-label">
24-
<?= /* @escapeNotVerified */ __('System Messages:') ?>
24+
<?= $block->escapeHtml(__('System Messages:')) ?>
2525
</span>
2626

27-
<?php if ($block->getCriticalCount()): ?>
27+
<?php if ($block->getCriticalCount()) : ?>
2828
<div class="message message-warning error">
2929
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Critical System Messages')) ?>">
30-
<?= /* @escapeNotVerified */ $block->getCriticalCount() ?>
30+
<?= (int) $block->getCriticalCount() ?>
3131
</a>
3232
</div>
33-
<?php endif;?>
33+
<?php endif; ?>
3434

35-
<?php if ($block->getMajorCount()): ?>
35+
<?php if ($block->getMajorCount()) : ?>
3636
<div class="message message-warning warning">
3737
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Major System Messages')) ?>">
38-
<?= /* @escapeNotVerified */ $block->getMajorCount() ?>
38+
<?= (int) $block->getMajorCount() ?>
3939
</a>
4040
</div>
41-
<?php endif;?>
41+
<?php endif; ?>
4242
</div>
4343
<div id="message-system-all" title="<?= $block->escapeHtml(__('System messages')) ?>" data-mage-init='<?= $block->escapeHtml($block->getSystemMessageDialogJson()) ?>'></div>
4444
</div>

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
7+
/** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */
98
?>
10-
<?php /** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */ ?>
119

12-
<div style="display:none" id="system_messages_list" data-role="system_messages_list" title="<?= $block->escapeHtml($block->getPopupTitle()) ?>">
10+
<div style="display:none" id="system_messages_list" data-role="system_messages_list"
11+
title="<?= $block->escapeHtmlAttr($block->getPopupTitle()) ?>">
1312
<ul class="message-system-list messages">
14-
<?php foreach ($block->getUnreadMessages() as $message): ?>
15-
<li class="message message-warning <?= /* @escapeNotVerified */ $block->getItemClass($message) ?>">
16-
<?= /* @escapeNotVerified */ $message->getText() ?>
13+
<?php foreach ($block->getUnreadMessages() as $message) : ?>
14+
<li class="message message-warning <?= $block->escapeHtmlAttr($block->getItemClass($message)) ?>">
15+
<?= $block->escapeHtml($message->getText()) ?>
1716
</li>
1817
<?php endforeach;?>
1918
</ul>
@@ -27,4 +26,4 @@
2726
}
2827
}
2928
}
30-
</script>
29+
</script>

0 commit comments

Comments
 (0)