Skip to content

Commit c7aa4e9

Browse files
committed
Prevent XSS on container name in view and print label.
1 parent 11dbbe5 commit c7aa4e9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div style="text-align: center">
2-
<h2><?php echo $container['Container']['name']; ?></h2>
2+
<h2><?php echo Sanitize::html($container['Container']['name'], array('remove' => true)); ?></h2>
33
<?php echo $this->QR->image($Fullwebroot.'/containers/view/'.$container['Container']['slug']); ?>
44
</div>
55

app/View/Containers/view.ctp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
", array('inline' => false));
1313
echo $this->Html->script('views/containers/view', array('inline' => false));
1414
?>
15-
<h2><?php echo $container['Container']['name']; ?></h2>
15+
<h2><?php echo Sanitize::html($container['Container']['name'], array('remove' => true)); ?></h2>
1616
<p>
1717
<?php
1818
if(!empty($container['Location']['name'])) {

0 commit comments

Comments
 (0)