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