Skip to content

Commit

Permalink
20.7.1 SHQ23-1281 Fix security linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wsajosh committed Jun 27, 2024
1 parent 9914777 commit a540f93
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 46 deletions.
48 changes: 48 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
include:
- project: ShipperHQ/DevOps/GitLabTemplates
ref: INFRA-672
file: /magento/release.gitlab-ci.yml

stages:
- tag
- release to GitLab
- release to GitHub

# Denote whether to build major, minor or patch release
major release:
stage: tag
variables:
VERSION_INCREMENT: "major"
extends:
- .m2_module_release

minor release:
stage: tag
variables:
VERSION_INCREMENT: "minor"
extends:
- .m2_module_release

patch release:
stage: tag
variables:
VERSION_INCREMENT: "patch"
extends:
- .m2_module_release

# Build public release
build release to GitHub:
stage: release to GitHub
variables:
GITHUB_REPO: "git@github.com:shipperhq/module-logger.git"
when: on_success
needs:
- job: major release
optional: true
- job: minor release
optional: true
- job: patch release
optional: true
extends:
- .m2_public_release

4 changes: 4 additions & 0 deletions CHANGELOG-PUBLIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ MNB-5 Move to declarative schema
MNB-2430 M2.4.4 compatibility


## 20.7.1 (2024-06-27)
SHQ23-1281 Fix security linter warnings


4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ MNB-5 Move to declarative schema
MNB-2430 M2.4.4 compatibility


## 20.7.1 (2024-06-27)
SHQ23-1281 Fix security linter warnings


48 changes: 30 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,32 @@ Facts

Compatibility
-------------
- Magento >= 2.0 (Includes 2.2)
- Supports both Magento Open Source (Community) and Magento Commerce (Enterprise)

This library aims to support and is tested against the following PHP
implementations:

* PHP 5.5
* PHP 5.6
* PHP 5.7
* PHP 7.x (Please consult [Magento 2 requirements](http://devdocs.magento.com/magento-system-requirements.html) for any exceptions)

Enforced in the composer.json
This module supports and is tested against the following Magento versions:

* 2.4.7-beta1
* 2.4.6-p1
* 2.4.6
* 2.4.5-p3
* 2.4.5-p2
* 2.4.5-p1
* 2.4.5
* 2.4.4-p4
* 2.4.4-p3
* 2.4.4-p2
* 2.4.4-p1
* 2.4.4
* 2.4.3-p3
* 2.4.3-p2
* 2.4.3
* 2.4.2
* 2.4.1
* 2.4.0

per the [official Magento 2 requirements](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html)

Supports both Magento Opensource (Community) and Magento Commerce (Enterprise)

Compatibility with earlier editions is possible but not maintained.

Installation Instructions
-------------------------
Expand All @@ -49,14 +63,12 @@ Any contribution is highly appreciated. The best way to contribute code is to op

License
-------
Copyright (c) 2015 Zowta LLC & Zowta Ltd. See [LICENSE][] for
details.

We also dutifully respect the [Magento][] OSL license, which is included in this codebase.
Copyright (c) 2015 Zowta LLC & Zowta Ltd. See [LICENSE] for details.

We also dutifully respect the [Magento] OSL license.

[license]: LICENSE.md
[magento]: Magento2_LICENSE.md
[license]: LICENSE.txt
[Magento]: https://github.com/magento/magento2/blob/2.4-develop/LICENSE.txt

Copyright
---------
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "shipperhq/module-logger",
"description": "ShipperHQ Logger",
"type": "magento2-module",
"version": "20.7.0",
"version": "20.7.1",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
38 changes: 19 additions & 19 deletions src/view/adminhtml/templates/grid.phtml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?php
/**
*
* ShipperHQ
* ShipperHQ
*
* NOTICE OF LICENSE
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category ShipperHQ
* @package ShipperHQ_Logger
Expand Down Expand Up @@ -116,16 +116,16 @@ $numColumns = sizeof($block->getColumns());
<button class="action-previous"
type="button"
onclick="<?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>.setPage('<?php /* @escapeNotVerified */ echo($_curPage - 1) ?>');return false;">
<span><?php /* @escapeNotVerified */ echo __('Previous page') ?></span>
<span><?= $block->escapeHtml(__('Previous page')) ?></span>
</button>
<?php else: ?>
<button type="button" class="action-previous disabled"><span><?php /* @escapeNotVerified */ echo __('Previous page') ?></span></button>
<?php endif; ?>

<input type="text"
id="<?php echo $block->escapeHtml($block->getHtmlId())?>_page-current"
name="<?php /* @escapeNotVerified */ echo $block->getVarNamePage() ?>"
value="<?php /* @escapeNotVerified */ echo $_curPage ?>"
name="<?= $block->escapeHtml($block->getVarNamePage()) ?>"
value="<?= $block->escapeHtml($_curPage) ?>"
class="admin__control-text"
onkeypress="<?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>.inputPage(event, '<?php /* @escapeNotVerified */ echo $_lastPage ?>')" <?php /* @escapeNotVerified */ echo $block->getUiId('current-page') ?> />

Expand All @@ -134,13 +134,13 @@ $numColumns = sizeof($block->getColumns());
<?php /* @escapeNotVerified */ echo __('of %1', '<span>' . $block->getCollection()->getLastPageNumber() . '</span>') ?>
</label>
<?php if ($_curPage < $_lastPage): ?>
<button title="<?php /* @escapeNotVerified */ echo __('Next page') ?>"
<button title="<?= $block->escapeHtml(__('Next page')) ?>"
class="action-next"
onclick="<?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>.setPage('<?php /* @escapeNotVerified */ echo($_curPage + 1) ?>');return false;">
<span><?php /* @escapeNotVerified */ echo __('Next page') ?></span>
<span><?= $block->escapeHtml(__('Next page')) ?></span>
</button>
<?php else: ?>
<button type="button" class="action-next disabled"><span><?php /* @escapeNotVerified */ echo __('Next page') ?></span></button>
<button type="button" class="action-next disabled"><span><?= $block->escapeHtml(__('Next page')) ?></span></button>
<?php endif; ?>
</div>
</div>
Expand Down
16 changes: 8 additions & 8 deletions src/view/adminhtml/templates/view.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@

<?php if($messageData = $block->getMessageData()): ?>
<div class="page-head">
<h3><?php echo __('Message Details') ?></h3>
<h3><?= $block->escapeHtml(__('Message Details')) ?></h3>
</div>
<div class="button-set"><a href="<?php echo $block->getBackUrl() ?>" class="left">&laquo; <?php echo __('Back to ShipperHQ Log') ?></a></div><br />
<div class="button-set"><a href="<?= $block->escapeHtml($block->getBackUrl()) ?>" class="left">&laquo; <?= $block->escapeHtml(__('Back to ShipperHQ Log')) ?></a></div><br />
<div class="wsalogger-detail">
<p><strong><?php echo __('Code:') ?></strong> <?php echo $messageData->getCode(); ?></p>
<p><strong><?php echo __('Severity:') ?></strong> <?php echo $messageData->getSeverity(); ?></p>
<p><strong><?php echo __('Date Added:') ?></strong> <?php echo $messageData->getDateAdded(); ?></p>
<p><strong><?php echo __('Title:') ?></strong> <?php echo $messageData->getTitle(); ?></p>
<p><strong><?php echo __('Message:') ?></strong></p>
<p><strong><?= $block->escapeHtml(__('Code:')) ?></strong> <?= $block->escapeHtml($messageData->getCode()); ?></p>
<p><strong><?= $block->escapeHtml(__('Severity:')) ?></strong> <?= $block->escapeHtml($messageData->getSeverity()); ?></p>
<p><strong><?= $block->escapeHtml(__('Date Added:')) ?></strong> <?= $block->escapeHtml($messageData->getDateAdded()); ?></p>
<p><strong><?= $block->escapeHtml(__('Title:')) ?></strong> <?= $block->escapeHtml($messageData->getTitle()); ?></p>
<p><strong><?= $block->escapeHtml(__('Message:')) ?></strong></p>
<div style='width:100%; word-wrap: break-word;'>
<?php echo '<pre>'.htmlentities($messageData->getDescription()).'</pre>'; ?>
</div>
</div>
<br />
<div class="button-set"><a href="<?php echo $block->getBackUrl() ?>" class="left">&laquo; <?php echo __('Back to ShipperHQ Log') ?></a></div><br />
<div class="button-set"><a href="<?= $block->escapeHtml($block->getBackUrl()) ?>" class="left">&laquo; <?= $block->escapeHtml(__('Back to ShipperHQ Log')) ?></a></div><br />
<?php endif; ?>

0 comments on commit a540f93

Please sign in to comment.