File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed
Sales/Controller/Adminhtml/Order Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ class AddComment extends \Magento\Sales\Controller\Adminhtml\Order implements Ht
20
20
*
21
21
* @see _isAllowed()
22
22
*/
23
- const ADMIN_RESOURCE = 'Magento_Sales::comment ' ;
23
+ public const ADMIN_RESOURCE = 'Magento_Sales::comment ' ;
24
24
25
25
/**
26
26
* ACL resource needed to send comment email notification
27
27
*/
28
- const ADMIN_SALES_EMAIL_RESOURCE = 'Magento_Sales::emails ' ;
28
+ public const ADMIN_SALES_EMAIL_RESOURCE = 'Magento_Sales::emails ' ;
29
29
30
30
/**
31
31
* Add order comment action
@@ -52,13 +52,12 @@ public function execute()
52
52
$ notify = false ;
53
53
}
54
54
55
- $ history = $ order ->addStatusHistoryComment ($ data ['comment ' ], $ data ['status ' ]);
55
+ $ comment = trim (strip_tags ($ data ['comment ' ]));
56
+ $ history = $ order ->addStatusHistoryComment ($ comment , $ data ['status ' ]);
56
57
$ history ->setIsVisibleOnFront ($ visible );
57
58
$ history ->setIsCustomerNotified ($ notify );
58
59
$ history ->save ();
59
60
60
- $ comment = trim (strip_tags ($ data ['comment ' ]));
61
-
62
61
$ order ->save ();
63
62
/** @var OrderCommentSender $orderCommentSender */
64
63
$ orderCommentSender = $ this ->_objectManager
Original file line number Diff line number Diff line change 135
135
<pht >pht</pht >
136
136
<phar >phar</phar >
137
137
<svg >svg</svg >
138
+ <svgz >svgz</svgz >
138
139
<xml >xml</xml >
139
140
<xhtml >xhtml</xhtml >
140
141
</protected_extensions >
Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+
7
+ // phpcs:ignoreFile
6
8
?>
7
9
<!doctype html>
8
10
<html xmlns="http://www.w3.org/1999/xhtml" >
9
11
<head>
10
12
<title><?= $ this ->pageTitle ?> </title>
11
- <base href="<?= $ this ->getViewFileUrl () ?> " />
13
+ <base href="<?= $ this ->escaper -> escapeHtmlAttr ( $ this -> getViewFileUrl () ) ?> " />
12
14
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13
15
<meta name="robots" content="*"/>
14
16
<link rel="stylesheet" href="css/styles.css" type="text/css" />
Original file line number Diff line number Diff line change @@ -595,7 +595,7 @@ private function redirectToBaseUrl()
595
595
*/
596
596
private function isReportIdValid (string $ reportId ): bool
597
597
{
598
- return (bool )preg_match ('/[a-fA-F0-9]{64}/ ' , $ reportId );
598
+ return (bool )preg_match ('/^ [a-fA-F0-9]{64}$ / ' , $ reportId );
599
599
}
600
600
601
601
/**
You can’t perform that action at this time.
0 commit comments