mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Merge pull request from GHSA-cmgc-h4cx-3v43
doc: Make sure to correctly access images
This commit is contained in:
commit
6c03c80f97
@ -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…
x
Reference in New Issue
Block a user