We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ff3ca5 commit f969b9dCopy full SHA for f969b9d
dev/tests/functional/utils/log.php
@@ -9,6 +9,11 @@
9
}
10
11
$name = urldecode($_GET['name']);
12
-$file = file_get_contents('../../../../var/log/' . $name);
+$logDir = realpath('../../../../var/log');
13
+$logFile = realpath($logDir .'/' .$name);
14
+if (!$logFile || !$logDir || mb_strpos($logFile, $logDir .'/') !== 0) {
15
+ throw new \InvalidArgumentException('Invalid log file name');
16
+}
17
+$file = file_get_contents($logFile);
18
19
echo serialize($file);
0 commit comments