File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
app/code/Magento/Catalog/Model/Product/Option/Type/File Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ class ValidatorInfo extends Validator
4949 * @var IoFile
5050 */
5151 private $ ioFile ;
52+
5253 /**
5354 * @var NotProtectedExtension
5455 */
@@ -147,12 +148,14 @@ private function validatePath(array $optionValuePath): bool
147148 {
148149 foreach ([$ optionValuePath ['quote_path ' ], $ optionValuePath ['order_path ' ]] as $ path ) {
149150 $ pathInfo = $ this ->ioFile ->getPathInfo ($ path );
150- if (isset ($ pathInfo ['extension ' ])) {
151- if (!$ this ->fileValidator ->isValid ($ pathInfo ['extension ' ])) {
152- return false ;
153- }
151+
152+ if (isset ($ pathInfo ['extension ' ])
153+ && (empty ($ pathInfo ['extension ' ]) || !$ this ->fileValidator ->isValid ($ pathInfo ['extension ' ]))
154+ ) {
155+ return false ;
154156 }
155157 }
158+
156159 return true ;
157160 }
158161
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Options -Indexes
1111AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
1212Options -ExecCGI
1313
14- <FilesMatch ".+ \.(ph(p[3457]?|t|tml)|[aj]sp|p[ly]|sh|cgi|shtml?|html?)$" >
14+ <FilesMatch ".* \.(ph(p[3457]?|t|tml)|[aj]sp|p[ly]|sh|cgi|shtml?|html?)$" >
1515SetHandler default-handler
1616</FilesMatch >
1717
You can’t perform that action at this time.
0 commit comments