doc: Make sure to correctly access images
This commit is contained in:
parent
7abb62976a
commit
90e23ebaf3
|
@ -139,7 +139,7 @@ class ModuleController extends DocController
|
|||
$image = $this->params->getRequired('image');
|
||||
$docPath = $this->getPath($module, Icinga::app()->getModuleManager()->getModuleDir($module, '/doc'));
|
||||
$imagePath = realpath($docPath . '/' . $image);
|
||||
if ($imagePath === false) {
|
||||
if ($imagePath === false || substr($imagePath, 0, strlen($docPath)) !== $docPath) {
|
||||
$this->httpNotFound('%s does not exist', $image);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue