Skip to content

Commit

Permalink
Disabled and disallowed SWF file extension in WYSIWYG (#3108)
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Mar 30, 2023
1 parent d0bbbc7 commit 0db0f33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions app/code/core/Mage/Cms/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,11 @@ public function getAllowedStreamWrappers()
/**
* Check is swf file extension disabled
*
* @return bool
* @return true
* @deprecated since 19.5.0
*/
public function isSwfDisabled()
{
$statusSwf = Mage::getConfig()->getNode(self::XML_NODE_ALLOWED_MEDIA_EXT_SWF);
if ($statusSwf instanceof Mage_Core_Model_Config_Element) {
$statusSwf = $statusSwf->asArray()[0];
}

return $statusSwf ? false : true;
return true;
}
}
2 changes: 1 addition & 1 deletion app/code/core/Mage/Cms/Model/Wysiwyg/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function getConfig($data = [])
Mage::getBaseUrl('js') . 'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css',
'width' => '100%',
'plugins' => [],
'media_disable_flash' => Mage::helper('cms')->isSwfDisabled()
'media_disable_flash' => true
]);

$config->setData('directives_url_quoted', preg_quote($config->getData('directives_url')));
Expand Down

0 comments on commit 0db0f33

Please sign in to comment.