-
Notifications
You must be signed in to change notification settings - Fork 804
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5102 in SW/shopware from sw-18917/5.2/fix-string-…
…compiler to 5.2 * commit '283bb52301af9fef4da9bc8d8cc4b6a1f27bc767': SW-18917 - Add whitelist for smarty functions SW-18917 - Optimize template security for mail preview and merchant mails
- Loading branch information
Showing
6 changed files
with
419 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
/** | ||
* Shopware 5 | ||
* Copyright (c) shopware AG | ||
* | ||
* According to our dual licensing model, this program can be used either | ||
* under the terms of the GNU Affero General Public License, version 3, | ||
* or under a proprietary license. | ||
* | ||
* The texts of the GNU Affero General Public License with an additional | ||
* permission and of our proprietary license can be found at and | ||
* in the LICENSE file you have received along with this program. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* "Shopware" is a registered trademark of shopware AG. | ||
* The licensing of the program under the AGPLv3 does not imply a | ||
* trademark license. Therefore any rights, title and interest in | ||
* our trademarks remain entirely with us. | ||
*/ | ||
|
||
namespace Shopware\Components\Template; | ||
|
||
class Security extends \Smarty_Security | ||
{ | ||
public function __construct(\Smarty $smarty, $config = []) | ||
{ | ||
if (is_array($config)) { | ||
foreach ($config as $key => $value) { | ||
if (property_exists($this, $key)) { | ||
$this->$key = $value; | ||
} | ||
} | ||
} | ||
|
||
parent::__construct($smarty); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.