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 8dd5439 commit 0ef51ecCopy full SHA for 0ef51ec
app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php
@@ -231,6 +231,11 @@ public function deleteDirectory($path)
231
$io->getFilteredPath($path)
232
));
233
}
234
+ if (strpos($pathCmp, chr(0)) !== false
235
+ || preg_match('#(^|[\\\\/])\.\.($|[\\\\/])#', $pathCmp)
236
+ ) {
237
+ throw new Exception('Detected malicious path or filename input.');
238
+ }
239
240
if (Mage::helper('core/file_storage_database')->checkDbUsage()) {
241
Mage::getModel('core/file_storage_directory_database')->deleteDirectory($path);
0 commit comments