Skip to content

Commit

Permalink
Merge pull request #377 from chemezov/chemezov-fix-xss-1
Browse files Browse the repository at this point in the history
fixed XSS on error page
  • Loading branch information
nadar authored May 24, 2022
2 parents e69a13b + 333c1e6 commit 00ba99c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ In order to read more about upgrading and BC breaks have a look at the [UPGRADE
## 4.2.1

+ [#375](https://github.com/luyadev/luya-module-cms/pull/375) Fixed Website delete event
+ [#377](https://github.com/luyadev/luya-module-cms/pull/377) Fixed XSS on error page

## 4.2.0 (9. December 2021)

Expand Down
7 changes: 5 additions & 2 deletions src/frontend/views/error/index.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<?php
use \luya\helpers\Html;
?>
<html>
<head>
<!-- Latest compiled and minified CSS -->
Expand All @@ -23,7 +26,7 @@
<div class="span12">
<div class="hero-unit center">
<?php if ($exception !== null): ?>
<h1><?php echo $exception->getMessage(); ?>
<h1><?php echo Html::encode($exception->getMessage()); ?>
<small><br/><br/>
<p class="red">Error <?php echo $exception->statusCode; ?></p></small>
</h1>
Expand All @@ -37,4 +40,4 @@
</div>
</div>
</body>
</html>
</html>

0 comments on commit 00ba99c

Please sign in to comment.