Skip to content

Commit

Permalink
Bug #105: XSS related bug fixes (#107)
Browse files Browse the repository at this point in the history
* Bug #105: XSS related bug fixes

* Bug #105: XSS related bug fixes
  • Loading branch information
sagar-ttpl authored and manojLondhe committed Sep 3, 2018
1 parent 791705b commit 7d9854d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tjreports/administrator/views/tjreports/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@
{
?>
<a href="<?php echo $link; ?>" title="<?php echo JText::_('COM_TJREPORTS_EDIT'); ?>">
<?php echo $row->title; ?>
<?php echo htmlspecialchars($row->title, ENT_COMPAT, 'UTF-8'); ?>
</a>
<?php
}
else
{
echo $row->title;
echo htmlspecialchars($row->title, ENT_COMPAT, 'UTF-8');
}
?>
</td>
Expand Down
2 changes: 2 additions & 0 deletions tjreports/site/models/reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,8 @@ public function getReportLink($reportToLink, $filters)
*/
public function getDefaultReport($pluginName)
{
$db = JFactory::getDBO();

JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_tjreports/tables');
$reportTable = JTable::getInstance('Tjreport', 'TjreportsTable', array('dbo', $db));
$reportTable->load(array('plugin' => $pluginName, 'default' => 1));
Expand Down
2 changes: 1 addition & 1 deletion tjreports/site/views/reports/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
if ($app->isSite() && isset($this->reportData->title))
{
?>
<h2 class="title"><?php echo $this->reportData->title?></h2>
<h2 class="title"><?php echo htmlspecialchars($this->reportData->title, ENT_COMPAT, 'UTF-8'); ?></h2>
<?php
}
?>
Expand Down

0 comments on commit 7d9854d

Please sign in to comment.