Skip to content

Commit

Permalink
added allowed_classes=false param to unserialize function and changed…
Browse files Browse the repository at this point in the history
… interop container to psr container
  • Loading branch information
mariateresapomar committed Sep 26, 2022
1 parent 533764f commit 89ae612
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Controller/MelisPluginRendererController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function getPluginAction()
$pluginHardcodedConfig = $post['pluginHardcodedConfig'];
$pluginHardcodedConfig = html_entity_decode($pluginHardcodedConfig, ENT_QUOTES);
$pluginHardcodedConfig = html_entity_decode($pluginHardcodedConfig, ENT_QUOTES);
$pluginHardcodedConfig = unserialize($pluginHardcodedConfig);
$pluginHardcodedConfig = unserialize($pluginHardcodedConfig, ['allowed_classes' => false]);
}

$translator = $this->getServiceManager()->get('translator');
Expand Down
2 changes: 1 addition & 1 deletion src/Navigation/MelisFrontNavigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace MelisFront\Navigation;

use Laminas\Navigation\Service\DefaultNavigationFactory;
use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;
use Laminas\ServiceManager\ServiceManager;
use Laminas\EventManager\EventManager;
use Laminas\EventManager\EventManagerInterface;
Expand Down
4 changes: 2 additions & 2 deletions src/Service/MelisSiteConfigService.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public function getSiteConfig($siteId, $returnAll = false)
$siteConfig,
[
'site' => [
$siteName => unserialize($dbConf['sconf_datas'])
$siteName => unserialize($dbConf['sconf_datas'], ['allowed_classes' => false])
],
],
true
Expand All @@ -259,7 +259,7 @@ public function getSiteConfig($siteId, $returnAll = false)
[
'site' => [
$siteName => [
$siteId => unserialize($dbConf['sconf_datas'])
$siteId => unserialize($dbConf['sconf_datas'], ['allowed_classes' => false])
],
]
],
Expand Down

0 comments on commit 89ae612

Please sign in to comment.