mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 08:14:03 +02:00
Merge pull request from GHSA-cmgc-h4cx-3v43
doc: Make sure to correctly access images (cherry picked from commit 6c03c80f97fa66c0a2b36ce282cb4cef8854f215)
This commit is contained in:
parent
ffe8741c66
commit
80875d91bb
@ -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