Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed XSS on error page #377

Merged
merged 3 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>