File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -221,9 +221,9 @@ protected function findTemplate($name)
221
221
}
222
222
223
223
try {
224
- $ this ->validateName ($ name );
225
-
226
224
list ($ namespace , $ shortname ) = $ this ->parseName ($ name );
225
+
226
+ $ this ->validateName ($ shortname );
227
227
} catch (LoaderError $ e ) {
228
228
if (!$ throw ) {
229
229
return false ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ public function testGetSourceContext()
31
31
public function testSecurity ($ template )
32
32
{
33
33
$ loader = new FilesystemLoader ([__DIR__ .'/../Fixtures ' ]);
34
+ $ loader ->addPath (__DIR__ .'/../Fixtures ' , 'foo ' );
34
35
35
36
try {
36
37
$ loader ->getCacheKey ($ template );
@@ -62,6 +63,10 @@ public function getSecurityTests()
62
63
['filters \\\\.. \\\\.. \\\\AutoloaderTest.php ' ],
63
64
['filters \\//../ \\/ \\.. \\AutoloaderTest.php ' ],
64
65
['/../AutoloaderTest.php ' ],
66
+ ['@__main__/../AutoloaderTest.php ' ],
67
+ ['@foo/../AutoloaderTest.php ' ],
68
+ ['@__main__/../../AutoloaderTest.php ' ],
69
+ ['@foo/../../AutoloaderTest.php ' ],
65
70
];
66
71
}
67
72
You can’t perform that action at this time.
0 commit comments