Skip to content

Commit 8844968

Browse files
committed
SECURITY: Fix Directory Traversal Vulerability.
1 parent 9216d86 commit 8844968

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Block/Bookmarks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected function _title()
6868
*/
6969
protected function _content()
7070
{
71-
$template = TREAN_TEMPLATES . '/block/' . $this->_params['template'] . '.inc';
71+
$template = TREAN_TEMPLATES . '/block/' . basename($this->_params['template']) . '.inc';
7272

7373
$sortby = 'title';
7474
$sortdir = 0;

lib/Block/Mostclicked.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ protected function _title()
5858
*/
5959
protected function _content()
6060
{
61-
$template = TREAN_TEMPLATES . '/block/' . $this->_params['template'] . '.inc';
61+
$template = TREAN_TEMPLATES . '/block/' . basename($this->_params['template']) . '.inc';
6262

6363
$html = '';
6464
$bookmarks = $GLOBALS['trean_gateway']->listBookmarks('clicks', 1, 0, $this->_params['rows']);

0 commit comments

Comments
 (0)