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)
221221 }
222222
223223 try {
224- $ this ->validateName ($ name );
225-
226224 list ($ namespace , $ shortname ) = $ this ->parseName ($ name );
225+
226+ $ this ->validateName ($ shortname );
227227 } catch (LoaderError $ e ) {
228228 if (!$ throw ) {
229229 return false ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ public function testGetSourceContext()
3131 public function testSecurity ($ template )
3232 {
3333 $ loader = new FilesystemLoader ([__DIR__ .'/../Fixtures ' ]);
34+ $ loader ->addPath (__DIR__ .'/../Fixtures ' , 'foo ' );
3435
3536 try {
3637 $ loader ->getCacheKey ($ template );
@@ -62,6 +63,10 @@ public function getSecurityTests()
6263 ['filters \\\\.. \\\\.. \\\\AutoloaderTest.php ' ],
6364 ['filters \\//../ \\/ \\.. \\AutoloaderTest.php ' ],
6465 ['/../AutoloaderTest.php ' ],
66+ ['@__main__/../AutoloaderTest.php ' ],
67+ ['@foo/../AutoloaderTest.php ' ],
68+ ['@__main__/../../AutoloaderTest.php ' ],
69+ ['@foo/../../AutoloaderTest.php ' ],
6570 ];
6671 }
6772
You can’t perform that action at this time.
0 commit comments