Skip to content

Commit

Permalink
Merge pull request #10996 from KorvinSzanto/feature/clean-up-xss
Browse files Browse the repository at this point in the history
Prevent browser blocked reflected XSS in dashboard search pages
  • Loading branch information
aembler authored and KorvinSzanto committed Oct 13, 2022
1 parent 2cf7546 commit 5e353be
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 13 deletions.
8 changes: 5 additions & 3 deletions concrete/blocks/express_entry_list/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<?php } ?>
<?php if ($tableDescription) { ?>
<p><?=$tableDescription?></p>
<?php }
<?php }

if (isset($entity)) { ?>
<?php if ($enableSearch) { ?>
<form method="get" action="<?=$c->getCollectionLink()?>">
Expand Down Expand Up @@ -87,7 +87,9 @@ class="table ccm-block-express-entry-list-table <?php if ($tableStriped) { ?><?p
<thead>
<tr>
<?php foreach ($result->getColumns() as $column) { ?>
<th class="<?=$column->getColumnStyleClass()?>"><a href="<?=$column->getColumnSortURL()?>"><?=$column->getColumnTitle()?></a></th>
<th class="<?=$column->getColumnStyleClass()?>">
<a href="<?=h($column->getColumnSortURL())?>"><?=$column->getColumnTitle()?></a>
</th>
<?php } ?>
</tr>
</thead>
Expand Down
2 changes: 1 addition & 1 deletion concrete/elements/express/search/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
?>
<li data-items-per-page="<?= $itemsPerPageOption; ?>">
<a class="dropdown-item <?= ($itemsPerPageOption === $itemsPerPage) ? 'active' : ''; ?>"
href="<?=$url?>"><?= $itemsPerPageOption; ?></a>
href="<?= h($url) ?>"><?= $itemsPerPageOption; ?></a>
</li>
<?php } ?>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion concrete/elements/files/search/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class="btn btn-secondary p-2 dropdown-toggle"
?>

<li data-items-per-page="<?php echo $itemsPerPageOption; ?>">
<a class="dropdown-item <?php echo ($itemsPerPageOption === $itemsPerPage) ? 'active' : ''; ?>" href="<?php echo $url ?>">
<a class="dropdown-item <?php echo ($itemsPerPageOption === $itemsPerPage) ? 'active' : ''; ?>" href="<?php echo h($url) ?>">
<?php echo $itemsPerPageOption; ?>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion concrete/elements/groups/search/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class="btn btn-secondary p-2 dropdown-toggle"

<li data-items-per-page="<?php echo $itemsPerPageOption; ?>">
<a class="dropdown-item <?php echo ($itemsPerPageOption === $itemsPerPage) ? 'active' : ''; ?>"
href="<?php echo $url ?>">
href="<?php echo h($url) ?>">
<?php echo $itemsPerPageOption; ?>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion concrete/elements/pages/search/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class="btn btn-secondary p-2 dropdown-toggle"

<li data-items-per-page="<?php echo $itemsPerPageOption; ?>">
<a class="dropdown-item <?php echo ($itemsPerPageOption === $itemsPerPage) ? 'active' : ''; ?>"
href="<?php echo $url ?>">
href="<?php echo h($url) ?>">
<?php echo $itemsPerPageOption; ?>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion concrete/elements/users/search/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class="btn btn-secondary p-2 dropdown-toggle"

<li data-items-per-page="<?php echo $itemsPerPageOption; ?>">
<a class="dropdown-item <?php echo ($itemsPerPageOption === $itemsPerPage) ? 'active' : ''; ?>"
href="<?php echo $url ?>">
href="<?php echo h($url) ?>">
<?php echo $itemsPerPageOption; ?>
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<?php foreach ($result->getColumns() as $column) { ?>
<th class="<?=$column->getColumnStyleClass()?>">
<?php if ($column->isColumnSortable()) { ?>
<a href="<?=$column->getColumnSortURL()?>"><?=$column->getColumnTitle()?></a>
<a href="<?= h($column->getColumnSortURL()) ?>"><?=$column->getColumnTitle()?></a>
<?php } else { ?>
<span><?=$column->getColumnTitle()?></span>
<?php } ?>
Expand Down
2 changes: 1 addition & 1 deletion concrete/single_pages/dashboard/files/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class="btn btn-secondary dropdown-toggle dropdown-toggle-split"
<?php
if ($column->isColumnSortable()) { ?>
<a href="<?php
echo $column->getColumnSortURL() ?>">
echo h($column->getColumnSortURL()) ?>">
<?php
echo $column->getColumnTitle() ?>
</a>
Expand Down
2 changes: 1 addition & 1 deletion concrete/single_pages/dashboard/sitemap/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class="btn btn-secondary dropdown-toggle dropdown-toggle-split"
<?php /** @var Column $column */ ?>
<th class="<?php echo $column->getColumnStyleClass() ?>">
<?php if ($column->isColumnSortable()): ?>
<a href="<?php echo $column->getColumnSortURL() ?>">
<a href="<?php echo h($column->getColumnSortURL()) ?>">
<?php echo $column->getColumnTitle() ?>
</a>
<?php else: ?>
Expand Down
2 changes: 1 addition & 1 deletion concrete/single_pages/dashboard/users/groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class="btn btn-secondary dropdown-toggle dropdown-toggle-split"
<?php /** @var Column $column */ ?>
<th class="<?php echo $column->getColumnStyleClass() ?>">
<?php if ($column->isColumnSortable()): ?>
<a href="<?php echo $column->getColumnSortURL() ?>">
<a href="<?php echo h($column->getColumnSortURL()) ?>">
<?php echo $column->getColumnTitle() ?>
</a>
<?php else: ?>
Expand Down
2 changes: 1 addition & 1 deletion concrete/single_pages/dashboard/users/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class="btn btn-secondary dropdown-toggle dropdown-toggle-split"
<?php /** @var Column $column */ ?>
<th class="<?php echo $column->getColumnStyleClass() ?>">
<?php if ($column->isColumnSortable()): ?>
<a href="<?php echo $column->getColumnSortURL() ?>">
<a href="<?php echo h($column->getColumnSortURL()) ?>">
<?php echo $column->getColumnTitle() ?>
</a>
<?php else: ?>
Expand Down

0 comments on commit 5e353be

Please sign in to comment.