We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06c4594 commit 45330ffCopy full SHA for 45330ff
app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php
@@ -233,6 +233,11 @@ public function deleteDirectory($path)
233
$io->getFilteredPath($path)
234
));
235
}
236
+ if (strpos($pathCmp, chr(0)) !== false
237
+ || preg_match('#(^|[\\\\/])\.\.($|[\\\\/])#', $pathCmp)
238
+ ) {
239
+ throw new Exception('Detected malicious path or filename input.');
240
+ }
241
242
if (Mage::helper('core/file_storage_database')->checkDbUsage()) {
243
Mage::getModel('core/file_storage_directory_database')->deleteDirectory($path);
0 commit comments