File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
lib/internal/Magento/Framework/Filesystem/Directory Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -59,14 +59,18 @@ public function validate(
5959 $ path ,
6060 $ scheme
6161 );
62+ if (!$ absolutePath ) {
63+ $ actualPath = $ this ->driver ->getRealPathSafety ($ fullPath );
64+ } else {
65+ $ actualPath = $ this ->driver ->getRealPathSafety ($ path );
66+ }
6267
63- // Bypass deny list if in exception list.
6468 if (in_array ($ fullPath , $ this ->exceptionList , true )) {
6569 return ;
6670 }
6771
6872 foreach ($ this ->fileDenyList as $ file ) {
69- $ baseName = pathinfo ($ fullPath , PATHINFO_BASENAME );
73+ $ baseName = pathinfo ($ actualPath , PATHINFO_BASENAME );
7074 if (str_contains ($ baseName , $ file ) || preg_match ('# ' . "\. " . $ file . '# ' , $ fullPath )) {
7175 throw new ValidatorException (
7276 new Phrase ('"%1" is not a valid file path ' , [$ path ])
You can’t perform that action at this time.
0 commit comments