Skip to content

Commit 6d73024

Browse files
committed
Merge branch '2.4.5-develop' into AC-1981
2 parents dca20d3 + aabf11d commit 6d73024

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class AddComment extends \Magento\Sales\Controller\Adminhtml\Order implements Ht
2020
*
2121
* @see _isAllowed()
2222
*/
23-
const ADMIN_RESOURCE = 'Magento_Sales::comment';
23+
public const ADMIN_RESOURCE = 'Magento_Sales::comment';
2424

2525
/**
2626
* ACL resource needed to send comment email notification
2727
*/
28-
const ADMIN_SALES_EMAIL_RESOURCE = 'Magento_Sales::emails';
28+
public const ADMIN_SALES_EMAIL_RESOURCE = 'Magento_Sales::emails';
2929

3030
/**
3131
* Add order comment action
@@ -52,13 +52,12 @@ public function execute()
5252
$notify = false;
5353
}
5454

55-
$history = $order->addStatusHistoryComment($data['comment'], $data['status']);
55+
$comment = trim(strip_tags($data['comment']));
56+
$history = $order->addStatusHistoryComment($comment, $data['status']);
5657
$history->setIsVisibleOnFront($visible);
5758
$history->setIsCustomerNotified($notify);
5859
$history->save();
5960

60-
$comment = trim(strip_tags($data['comment']));
61-
6261
$order->save();
6362
/** @var OrderCommentSender $orderCommentSender */
6463
$orderCommentSender = $this->_objectManager

app/code/Magento/Store/etc/config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
<pht>pht</pht>
136136
<phar>phar</phar>
137137
<svg>svg</svg>
138+
<svgz>svgz</svgz>
138139
<xml>xml</xml>
139140
<xhtml>xhtml</xhtml>
140141
</protected_extensions>

pub/errors/default/page.phtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
// phpcs:ignoreFile
68
?>
79
<!doctype html>
810
<html xmlns="http://www.w3.org/1999/xhtml" >
911
<head>
1012
<title><?= $this->pageTitle ?></title>
11-
<base href="<?= $this->getViewFileUrl() ?>" />
13+
<base href="<?= $this->escaper->escapeHtmlAttr($this->getViewFileUrl()) ?>" />
1214
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1315
<meta name="robots" content="*"/>
1416
<link rel="stylesheet" href="css/styles.css" type="text/css" />

pub/errors/processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ private function redirectToBaseUrl()
595595
*/
596596
private function isReportIdValid(string $reportId): bool
597597
{
598-
return (bool)preg_match('/[a-fA-F0-9]{64}/', $reportId);
598+
return (bool)preg_match('/^[a-fA-F0-9]{64}$/', $reportId);
599599
}
600600

601601
/**

0 commit comments

Comments
 (0)