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 03ab0fd commit 43d3a0fCopy full SHA for 43d3a0f
dev/tests/functional/utils/log.php
@@ -5,10 +5,13 @@
5
*/
6
7
if (!isset($_GET['name'])) {
8
- throw new \InvalidArgumentException('The name of log file is required for getting logs.');
+ throw new \InvalidArgumentException(
9
+ 'The name of log file is required for getting logs.'
10
+ );
11
}
-
12
$name = urldecode($_GET['name']);
-$file = file_get_contents('../../../../var/log/' . $name);
13
+if (preg_match('/\.\.(\\\|\/)/', $name)) {
14
+ throw new \InvalidArgumentException('Invalid log file name');
15
+}
16
-echo serialize($file);
17
+echo serialize(file_get_contents('../../../../var/log' .'/' .$name));
0 commit comments