Skip to content

Commit

Permalink
adding an exception for web view
Browse files Browse the repository at this point in the history
  • Loading branch information
Radek-Suski committed Mar 3, 2016
1 parent 7ccf27d commit 4bde079
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
24 changes: 17 additions & 7 deletions administrator/components/com_admin/models/sysinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ protected function cleanPrivateData($dataArray, $dataType = 'other')

if (in_array($section, $privateSettings, true))
{
if(strstr($values, JPATH_ROOT))
if(is_string($values) && strstr($values, JPATH_ROOT))
{
$dataArray[$section] = 'xxxxxx';
}
Expand Down Expand Up @@ -333,13 +333,14 @@ public function phpinfoEnabled()
/**
* Method to get filter data from the model
*
* @param string $dataType Type of data to get safely
* @param string $dataType Type of data to get safely
* @param bool $public
*
* @return array
*
* @since 3.5
*/
public function getSafeData($dataType)
public function getSafeData($dataType, $public = true)
{
if (isset($this->safeData[$dataType]))
{
Expand All @@ -353,7 +354,7 @@ public function getSafeData($dataType)
return array();
}

$data = $this->$methodName();
$data = $this->$methodName($public);

$this->safeData[$dataType] = $this->cleanPrivateData($data, $dataType);

Expand Down Expand Up @@ -492,11 +493,12 @@ public function getExtensions()
/**
* Method to get the directory states
*
* @param $public - if true no information is going to be removed
* @return array States of directories
*
* @since 1.6
*/
public function getDirectory()
public function getDirectory($public)
{
if (!empty($this->directories))
{
Expand Down Expand Up @@ -605,8 +607,16 @@ public function getDirectory()
$this->addDirectory('administrator/cache', JPATH_CACHE, 'COM_ADMIN_CACHE_DIRECTORY');
}

$this->addDirectory('log', $registry->get('log_path', JPATH_ROOT . '/log'), 'COM_ADMIN_LOG_DIRECTORY');
$this->addDirectory('tmp', $registry->get('tmp_path', JPATH_ROOT . '/tmp'), 'COM_ADMIN_TEMP_DIRECTORY');
if($public)
{
$this->addDirectory('log', $registry->get('log_path', JPATH_ROOT . '/log'), 'COM_ADMIN_LOG_DIRECTORY');
$this->addDirectory('tmp', $registry->get('tmp_path', JPATH_ROOT . '/tmp'), 'COM_ADMIN_TEMP_DIRECTORY');
}
else
{
$this->addDirectory($registry->get('log_path', JPATH_ROOT . '/log'), $registry->get('log_path', JPATH_ROOT . '/log'), 'COM_ADMIN_LOG_DIRECTORY');
$this->addDirectory($registry->get('tmp_path', JPATH_ROOT . '/tmp'), $registry->get('tmp_path', JPATH_ROOT . '/tmp'), 'COM_ADMIN_TEMP_DIRECTORY');
}

return $this->directories;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected function getLayoutData()
'info' => $model->getSafeData('info'),
'phpSettings' => $model->getSafeData('phpSettings'),
'config' => $model->getSafeData('config'),
'directories' => $model->getSafeData('directory'),
'directories' => $model->getSafeData('directory', true),
'phpInfo' => $model->getSafeData('phpInfoArray'),
'extensions' => $model->getSafeData('extensions')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function getLayoutData()
),
'directories' => array(
'title' => JText::_('COM_ADMIN_DIRECTORY_PERMISSIONS', true),
'data' => $model->getSafeData('directory')
'data' => $model->getSafeData('directory', true)
),
'phpInfo' => array(
'title' => JText::_('COM_ADMIN_PHP_INFORMATION', true),
Expand Down

0 comments on commit 4bde079

Please sign in to comment.