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
49
49
* @var IoFile
50
50
*/
51
51
private $ ioFile ;
52
+
52
53
/**
53
54
* @var NotProtectedExtension
54
55
*/
@@ -147,12 +148,14 @@ private function validatePath(array $optionValuePath): bool
147
148
{
148
149
foreach ([$ optionValuePath ['quote_path ' ], $ optionValuePath ['order_path ' ]] as $ path ) {
149
150
$ 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 ;
154
156
}
155
157
}
158
+
156
159
return true ;
157
160
}
158
161
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Options -Indexes
11
11
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
12
12
Options -ExecCGI
13
13
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?)$" >
15
15
SetHandler default-handler
16
16
</FilesMatch >
17
17
You can’t perform that action at this time.
0 commit comments