Skip to content

Commit 483b96c

Browse files
Merge MAGETWO-92160 into 2.3-bugfixes-150918
2 parents a54212a + 2754c03 commit 483b96c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

dev/tests/functional/utils/log.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
declare(strict_types=1);
8+
79
if (!isset($_GET['name'])) {
8-
throw new \InvalidArgumentException('The name of log file is required for getting logs.');
10+
throw new \InvalidArgumentException(
11+
'The name of log file is required for getting logs.'
12+
);
913
}
10-
1114
$name = urldecode($_GET['name']);
12-
$file = file_get_contents('../../../../var/log/' . $name);
15+
if (preg_match('/\.\.(\\\|\/)/', $name)) {
16+
throw new \InvalidArgumentException('Invalid log file name');
17+
}
1318

14-
echo serialize($file);
19+
echo serialize(file_get_contents('../../../../var/log' .'/' .$name));

0 commit comments

Comments
 (0)