Skip to content

Commit 8ac34a2

Browse files
author
Maciej Malarz
committed
Fix security misconfiguration vulnerability allowing local remote arbitrary code execution.
1 parent f28d770 commit 8ac34a2

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

CacheWarmer/HydratorCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function warmUp($cacheDir)
5656
// we need the directory no matter the hydrator cache generation strategy.
5757
$hydratorCacheDir = $this->container->getParameter('doctrine_mongodb.odm.hydrator_dir');
5858
if (!file_exists($hydratorCacheDir)) {
59-
if (false === @mkdir($hydratorCacheDir, 0777, true)) {
59+
if (false === @mkdir($hydratorCacheDir, 0775, true)) {
6060
throw new \RuntimeException(sprintf('Unable to create the Doctrine Hydrator directory (%s)', dirname($hydratorCacheDir)));
6161
}
6262
} else if (!is_writable($hydratorCacheDir)) {

CacheWarmer/ProxyCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function warmUp($cacheDir)
5656
// we need the directory no matter the proxy cache generation strategy.
5757
$proxyCacheDir = $this->container->getParameter('doctrine_mongodb.odm.proxy_dir');
5858
if (!file_exists($proxyCacheDir)) {
59-
if (false === @mkdir($proxyCacheDir, 0777, true)) {
59+
if (false === @mkdir($proxyCacheDir, 0775, true)) {
6060
throw new \RuntimeException(sprintf('Unable to create the Doctrine Proxy directory (%s)', dirname($proxyCacheDir)));
6161
}
6262
} else if (!is_writable($proxyCacheDir)) {

DependencyInjection/Compiler/CreateHydratorDirectoryPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function process(ContainerBuilder $container)
3131
// Create document proxy directory
3232
$hydratorCacheDir = $container->getParameter('doctrine_mongodb.odm.hydrator_dir');
3333
if (!is_dir($hydratorCacheDir)) {
34-
if (false === @mkdir($hydratorCacheDir, 0777, true)) {
34+
if (false === @mkdir($hydratorCacheDir, 0775, true)) {
3535
exit(sprintf('Unable to create the Doctrine Hydrator directory (%s)', dirname($hydratorCacheDir)));
3636
}
3737
} elseif (!is_writable($hydratorCacheDir)) {

DependencyInjection/Compiler/CreateProxyDirectoryPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function process(ContainerBuilder $container)
3131
// Create document proxy directory
3232
$proxyCacheDir = $container->getParameter('doctrine_mongodb.odm.proxy_dir');
3333
if (!is_dir($proxyCacheDir)) {
34-
if (false === @mkdir($proxyCacheDir, 0777, true)) {
34+
if (false === @mkdir($proxyCacheDir, 0775, true)) {
3535
exit(sprintf('Unable to create the Doctrine Proxy directory (%s)', dirname($proxyCacheDir)));
3636
}
3737
} elseif (!is_writable($proxyCacheDir)) {

0 commit comments

Comments
 (0)